Skip to content

Instruments classifier trained with random forest and scikit learn

License

Notifications You must be signed in to change notification settings

jsvaldezv/instruments-classifier

Repository files navigation

Instruments Classifier

classifier

Instruments Classifier made with Python and Scikit Learn. First I collected audios of the instruments I wanted to the model to be able to predict, then I generated audio descriptors such as Centroid, Peak, Spread, MFCC in time and frequency domain. Later, I used all this info in order to train a random forest and be able to generate a model in .sav. Finally I build a little prototype with the exported model with Python and PYQT5 in order to just drop an audio and be able to predict which instrument is the sound.

Note: The training was performed in Jupyter lab and the prototype developed in Visual Studio Code but you should be able to run the code with spider, jupyter, pycharm or console itself as well.

Instruments the model can predict (at the moment)

  • Kick
  • Snare
  • HiHat
  • Guitar
  • Bass
  • Vocal

Local running

1. Create venv

python3 -m venv venv
source venv/bin/activate

2. Install dependencies

(venv) pip install -r requirements.txt

3. Run main file

(venv) python main.py

Recommendations

1. Run black to format your files with Python coding standards

(venv) black .

About

Instruments classifier trained with random forest and scikit learn

Resources

License

Stars

Watchers

Forks

Packages

No packages published