This package helps users transcribes drum audio hits into 6 classes - Hihat, Crash, Kick Drum, Snare, Ride, and Toms.
Run the following to install the python dependencies:
pip install librosa tensorflow numpy pandas scikit-learn streamlit streamlit-player
from DrumTranscriber import DrumTranscriber
import librosa
samples, sr = librosa.load(PATH/TO/AUDIO/CLIP)
transcriber = DrumTranscriber()
# pandas dataframe containing probabilities of classes
predictions = transcriber.predict(samples, sr)
cd to the parent directory and run the following command:
streamlit run frontend.py
A localhost website will appear with the demo app.
- Clone/Zip the directory
- Redownload the model .h5 file from
/model/drum_transcriber.h5
(https://drive.google.com/file/d/1w2fIHeyr-st3sbk1PYrtGOYW6YAD1fsi/view?usp=sharing)
Note: There is an issue with Github zipping the .h5 model file. To properly get the model to work, I suggest downloading the model file from the Google Drive above and directly to replace the model from the clone/zipped folder.