Skip to content

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

Vibeify - Mood Detection & Music Recommendation

Vibeify is a mood-aware Android application that recommends a single Spotify track tailored to the user’s current emotional state. Using Google ML Kit’s face-detection API, the app classifies the user’s expression into five moods: angry, sad, neutral, happy, or super happy and instantly streams a 15-second preview that matches the detected vibe. A built-in QR code lets onlookers open the same song on their own devices, creating an engaging and shareable music experience.

Sample UI

Updated Sample UI

Getting Started

  1. Clone the repository

    git clone https://github.com/judiemosinabre/vibeify.git
    cd vibeify
  2. Add your Spotify API keys
    In the project root (same folder as settings.gradle.kts),
    create a file named gradle.properties if it isn’t there already. Paste your credentials:

  #gradle.properties  (in .gitignore – never pushed)
  SPOTIFY_CLIENT_ID=yourRealClientIdHere
  SPOTIFY_CLIENT_SECRET=yourRealClientSecretHere
  1. Sync & build
    In Android Studio click "Sync Project"

  2. Configure Google ML Kit Face Detection
    Follow the official ML Kit Face Detection setup guide.

  3. Run the app

Features and Use Cases

1. Face Emotion Detection

  • Uses the device’s front camera with Google ML Kit Face Detection API.
  • Real-time classification into angry, sad, neutral, happy, super happy.
  • Tracks facial features such as smiling probability, eye openness, and head tilt in real-time.

2. Mood-Mapped Music Recommender

  • Fetches a random track from curated lists per mood.

3. Spotify Integration

  • 15-sec previews from Spotify API or Firebase MP3s when previews are missing.

4. Interactive Exhibit Mode

  • Displays QR linking directly to the Spotify track.

5. Share

  • Custom Text along with the track link in spotify for redirection.
  "Vibeify recommends this song!" + "\n" +
  "\n🎧 Listen On Spotify: " + trackUrl);

Technology Stack

  • Mobile Platform: Android Studio (Java)
  • AI/ML: Google ML Kit — Face Detection API for emotion recognition
  • Music API: Spotify Web API
  • Media: Android MediaPlayer
  • UI Assets: Glide (for album images), XML Layout, ZXing for QR generation
  • Backend (optional): Firebase (Storage)

Target Users

  • Music lovers (ages 13–30)
  • Students, social media users, and busy professionals
  • Tech fair visitors looking for an interactive and emotional music experience

How It Works

  1. User opens the app and grants camera access.
  2. The front camera captures facial expressions and sends data to ML Kit for emotion analysis.
  3. The app infers the current mood (happy, super happy, sad, neutral, angry).
  4. Based on the mood, a corresponding Spotify track is chosen.
  5. A 15-second song preview matching the mood plays instantly.
  6. A QR code can be scanned to open the song directly on another device.

Reflection

Creating Vibeify has been an insightful journey that pushed me to combine machine learning, Android development, and user experience design into a single real-time application. One of the most challenging yet rewarding aspects was fine-tuning the mood detection algorithm. I experimented with smile probability, head tilt, and eye openness to classify moods into five categories: Angry, Sad, Neutral, Happy, and Super Happy. Adjusting the thresholds to achieve accurate and consistent detection across different faces and conditions taught me the importance of iterative testing and real-world validation in ML-based applications.

Integrating the Spotify Web API also deepened my understanding of working with external APIs and handling authentication, particularly using the Client Credentials Flow. When Spotify preview URLs were unavailable, I implemented a fallback using Firebase Storage, which introduced me to cloud storage and media handling on Android. Overall, building Vibeify helped me strengthen my technical skills while learning how to deliver a responsive, intuitive, and engaging app that connects emotion with music in real time.

About

Vibeify is a mood-aware Android app that uses Google ML Kit to detect your facial expression and recommend a matching Spotify track. It streams a 15-second preview based on your vibe (angry, sad, neutral, happy, or super happy) and generates a QR code so others can instantly join the mood.

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages