How sudevsamuel07/music-genre-lyric-analyzer works
This is a Flask music-analysis application: a user submits audio by upload or URL, then receives a predicted genre and a lyrics transcript in the web interface. The analysis path combines MFCC extraction and CNN inference with Whisper transcription. The separate training script builds and saves the genre model. The README documents capabilities such as format support, segment voting, and model caching; some are not separate modules in the sampled source. The referenced data.json mapping is absent from the supplied tree, so its storage is not shown.
Main entry points: app.py Flask analysis route · feature_extractor_py_(with_kagglehub).py CNN training script · features.py Segment genre voting · genre_classifier.h5 Trained CNN model
Components 13
Web workflow
- Flask analysis route
app.py - Audio input staging
app.py - Uploaded audio files
uploads - Analysis interface
templates/index.html
Genre analysis
- MFCC extraction
features.py - Genre mapping loader
features.py - Segment genre voting
features.py - Trained CNN model
genre_classifier.h5
Lyrics transcription
- Whisper transcription
features.py
Model training
- CNN training script
feature_extractor_py_(with_kagglehub).py
Other components
- User
- Remote audio URL
- Whisper library
Connections 13
- User → Flask analysis route: submits audio
app.py - Flask analysis route → Audio input staging: stages input
app.py - Audio input staging → Uploaded audio files: saves file
app.py - Audio input staging → Remote audio URL: downloads audio
app.py - Flask analysis route → MFCC extraction: extracts features
app.py - Flask analysis route → Genre mapping loader: loads mapping
app.py - Flask analysis route → Segment genre voting: predicts genre
app.py - Segment genre voting → Trained CNN model: runs inference
README.md - Flask analysis route → Whisper transcription: requests transcript
app.py - Whisper transcription → Whisper library: transcribes audio
features.py - Flask analysis route → Analysis interface: renders results
app.py - CNN training script → Trained CNN model: saves model
feature_extractor_py_(with_kagglehub).py - CNN training script → MFCC extraction: extracts features