
AI-Based Music Genre Classification
Project Description:
The AI-Based Music Genre Classification system is designed to automatically detect and classify the genre of a given music file (MP3/WAV) using machine learning and audio signal processing techniques. By extracting meaningful features like tempo, rhythm, pitch, and frequency patterns, the system identifies genres such as rock, jazz, classical, hip-hop, pop, or blues. It can be used in music streaming apps, personal music libraries, or recommendation systems.
Core Objective:
To build a system that uses AI/ML to classify music tracks into their respective genres by analyzing the audio content, not just metadata or file tags.
Key Features:
-
Audio File Upload & Playback
-
Users can upload audio files (MP3, WAV).
-
Preview/play option for uploaded files.
-
-
Audio Feature Extraction
-
Mel-frequency cepstral coefficients (MFCCs)
-
Chroma features, spectral contrast, tempo
-
Zero-crossing rate, RMS energy
-
-
AI/ML Genre Classification
-
Trained model using supervised learning (SVM, Random Forest, CNN, or LSTM)
-
Outputs predicted genre with confidence score
-
-
Result Visualization
-
Bar chart or pie chart showing prediction probabilities
-
Option to compare with top 3 genre matches
-
-
Dataset Support
-
Pre-trained model on GTZAN or FMA (Free Music Archive) dataset
-
Tech Stack:
Audio Processing:
-
Librosa (Python) for feature extraction
-
FFmpeg for audio format conversion
Machine Learning:
-
Python + Scikit-learn for classical ML (SVM, RF, KNN)
-
TensorFlow/Keras for deep learning models (CNN for spectrogram classification)
Frontend:
-
HTML, CSS, Bootstrap
-
JavaScript + audio visualizer (optional)
Backend:
-
Node.js / PHP / Java backend for file upload and communication with ML model via API
-
Python server (Flask/Django) for ML model inference (optional if needed)
Database:
-
MongoDB or MySQL to store user uploads and prediction history
How It Works:
-
User uploads a music file.
-
System extracts audio features using Librosa.
-
Features are fed into a trained AI model.
-
Model predicts the genre and sends the result to frontend.
-
Visualization and feedback are shown to the user.