This application uses machine learning to classify music genres. It provides a user-friendly interface through Streamlit where users can upload audio files and get genre predictions along with confidence scores.
- Upload audio files (MP3 or WAV format)
- Real-time genre prediction
- Confidence scores for each genre
- Visual representation of predictions
- Support for multiple music genres
- Clone this repository:
git clone https://github.com/VishnuRam16/Music-Genre-Classification.git
cd Music-Genre-Classification- Install the required dependencies:
pip install -r requirements.txt- Start the Streamlit app:
streamlit run app.py-
Open your web browser and navigate to the URL shown in the terminal (usually http://localhost:8501)
-
Upload an audio file using the file uploader
-
Click the "Predict Genre" button to get the genre prediction and confidence scores
The application:
-
Extracts audio features using librosa:
- MFCC (Mel-frequency cepstral coefficients)
- Spectral Centroid
- Chroma features
-
Uses a Random Forest Classifier to predict the genre
-
Provides confidence scores for each possible genre
- Python 3.7+
- Dependencies listed in requirements.txt
This project is licensed under the MIT License - see the LICENSE file for details.