Logo Lanfrica

0xkhingx/Moodmix

Domain:

natural language processing

Record type:

software
Creator:
0xk
Host:
Capstone project for Electric Sheep Africa --- title: MoodMix emoji: 🎡 colorFrom: gray colorTo: green sdk: docker app_port: 7860 --- # MoodMix A mood-to-Spotify playlist generator that uses machine learning to detect emotion from speech or text input and creates a curated Spotify playlist based on the detected mood. ## Features - **Speech Emotion Recognition** β€” Record your voice via microphone; a CNN analyzes mel-spectrogram features to classify emotion (96.4% accuracy) - **Text Emotion Classification** β€” Type how you're feeling; a TF-IDF + Logistic Regression model classifies the sentiment (86.7% accuracy) - **Spotify Integration** β€” Automatically creates a playlist with 10 tracks matching the detected mood using Spotify's search API - **Streamlit UI** β€” Dark-themed interface with Font Awesome icons, mood-colored cards, and track previews ## Emotion Classes | Emotion | Search Query | Description | |---------|-------------|-------------| | Happy | upbeat, feel-good | Upbeat and joyful | | Sad | emotional, melancholy | Melancholic and reflective | | Angry | intense, heavy | Intense and powerful | | Calm | relaxing, peaceful | Peaceful and relaxed | | Fearful | dark, tense, suspenseful | Tense and uneasy | | Surprised | surprising, energetic | Bright and unexpected | | Disgusted | dark, industrial | Harsh and abrasive | ## Project Structure ``` moodmix/ β”œβ”€β”€ app.py # Streamlit entry point β”œβ”€β”€ requirements.txt # Dependencies β”œβ”€β”€ .env # Spotify API credentials (not tracked) β”œβ”€β”€ .gitignore β”œβ”€β”€ config/ β”‚ └── mood_features.json # Mood-to-query mappings and icons β”œβ”€β”€ data/ β”‚ β”œβ”€β”€ TESS/ # TESS audio dataset (not tracked, ~2800 WAVs) β”‚ β”œβ”€β”€ text_emotion/ # Text emotion dataset (train/test/val) β”‚ └── processed/ # Preprocessed numpy arrays (not tracked) β”œβ”€β”€ models/ β”‚ β”œβ”€β”€ speech_mood_model.pth # Trained CNN weights (32 MB) β”‚ β”œβ”€β”€ text_mood_pipeline.pkl# Text model + vectorizer β”‚ └── text_history.pkl # Text train …