A newer version of the Gradio SDK is available:
5.30.0
metadata
title: Music Genre Classifier & Lyrics Generator
emoji: 🎵
colorFrom: indigo
colorTo: purple
sdk: gradio
sdk_version: 5.22.0
app_file: app.py
pinned: false
license: mit
short_description: AI music genre detection and lyrics generation
Music Analysis & Lyrics Generator
This Hugging Face Space application analyzes music files and generates lyrics that match the musical characteristics.
Features
- Music Analysis: Detects tempo, time signature, key, emotion, and theme
- Genre Classification: Identifies the music genre using a pre-trained classifier
- Lyrics Generation: Creates lyrics that match the style, emotion, and length of your music using Qwen3-32B
How to Use
- Upload a music file or record audio directly in the app
- Click "Analyze and Generate Lyrics"
- View the analysis results showing tempo, key, emotion, theme, and genre
- Check the generated lyrics tailored to match your music
Supported Genres
Lyrics generation is currently limited to the following genres:
- Pop
- Rock
- Country
- Disco
- Metal
These genres have consistent syllable-to-beat relationships that work well with our beat-matching algorithm. For other genres, the application will still provide music analysis, but lyrics generation will be disabled.
Technical Details
This application uses:
- MusicAnalyzer: Custom analysis tool for detecting musical features
- Hugging Face Transformers: Pre-trained models for genre classification and lyrics generation
- Gradio: For the user interface
- Librosa: For audio processing
Requirements
See requirements.txt for detailed dependencies.
Limitations
- Large audio files may take longer to process
- The quality of lyrics generation depends on the clarity of the audio and the detected musical features
- Lyrics generation is restricted to specific genres (see Supported Genres section)
Credits
- Genre classification model: dima806/music_genres_classification
- LLM for lyrics generation: Qwen/Qwen3-32B