EmotiSound is an AI-powered audio analysis tool that "listens" to raw music files, extracts complex acoustic features, and predicts the emotional DNA of the song. Unlike basic mood classifiers, it generates a multi-dimensional emotional fingerprint and even maps music to synesthesia-inspired colors.
🔴 Live Demo: Try EmotiSound Now on Hugging Face Spaces
- 🎧 Advanced Audio Feature Extraction using Librosa (Danceability, Energy, Valence, Tempo, Brightness, etc.)
- 🧠 Ensemble AI Model – Voting Classifier with 5 powerful algorithms (Random Forest, Gradient Boosting, SVM, KNN, MLP)
- 🧬 Emotion DNA Radar Chart – Visualizes the unique emotional profile of any song
- 🎨 Synesthesia Color Engine – Converts sound frequencies and energy into vivid colors
- ☁️ Fully Containerized – Runs seamlessly with Docker and Hugging Face Spaces
- Backend: Python, Flask
- Machine Learning: Scikit-learn, NumPy, Pandas
- Audio Processing: Librosa, SoundFile, pydub + FFmpeg
- Frontend: HTML5, CSS3, JavaScript, Chart.js
- Deployment: Docker, Gunicorn, Hugging Face Spaces
- User uploads an
.mp3or.wavfile - System extracts low-level and high-level acoustic features using Librosa
- Features are normalized and passed to the pre-trained Ensemble Voting Classifier
- Model outputs emotion probabilities across 4 core dimensions:
- Euphoria ⚡
- Melancholy 🌧️
- Serenity ☮️
- Turbulence 🌪️
- Results displayed as interactive radar chart + synesthesia color palette
- Python 3.9 or higher
- FFmpeg installed and added to system PATH (download here)
-
Clone the repository
git clone https://github.com/itslovepatel/emotisound-live.git cd emotisound-live -
Install dependencies
pip install -r requirements.txt
-
(Optional) Retrain the model
python train_model.py
-
Run the app
python app.py
Then open http://127.0.0.1:5000 in your browser.
emotisound-live/
├── templates/
│ └── index.html # Frontend with Chart.js radar visualization
├── static/
│ └── (CSS, JS, assets)
├── app.py # Main Flask application
├── audio_processor.py # Feature extraction logic
├── train_model.py # Model training script
├── emotisound_brain.pkl # Trained ensemble model
├── requirements.txt # Python dependencies
├── Dockerfile # For Docker deployment
├── spotify_tracks.csv # Training dataset
└── README.md # You are here :)
Contributions are very welcome! Ideas for future features:
- Real-time microphone input
- Spotify/YouTube URL analysis
- Mood-based playlist generator
- Export emotion DNA as NFT metadata
Feel free to fork and open a Pull Request!
This project is licensed under the MIT License – see the LICENSE file for details.
Built with 🎵 passion and ☕ caffeine by Love Patel