Description: Develop a machine learning model to classify music clips into genres such as rock, jazz, or classical using audio features like tempo or spectral characteristics.
Suggested Dataset: GTZAN Genre Collection or Free Music Archive (FMA).
Tools: Python, Librosa, Scikit-learn.
This is a web app built with Flask that lets users upload an audio file and returns the predicted music genre using audio feature extraction and machine learning.
- Upload any audio file through a web form
- Automatic feature extraction using
librosa - Genre prediction using a LightGBM-trained model
- Deployed in Google Colab using
ngrok
- Train LightGBM Model using the feature_30_sec.csv file
- Audio file can be uploaded using either Google Colab's
filesmodule or Web interface created usingFlaskandngrok - Uses
librosato extract features from audio like mfcc, chroma-stft, zero-crossing-rate, etc. - Passes features to a trained model
- Returns the predicted music genre
Note: The app runs only while the Colab notebook is active.
Create a config.py file with NGROK_TOKEN = 'Your_ngrok_Authotoken' within the directory structure.
- README.md
- feature_30_sec.csv
- mgc_code.ipynb
- genres (directory)
Note: The genres folder contains audio files of different genres which can be used to test implementation.