Inspiration

Our inspiration for Mood Music came from the way music shapes our daily lives—sometimes, though, it’s hard to decide what to listen to. So, we created Mood Music to take the guesswork out of choosing. Based on your emotions, Mood Music intuitively selects songs that match your mood, letting you relax and enjoy the moment without having to think about what to play.

What it does

Mood Music intuitively captures the user’s emotions and delivers real-time music recommendations, creating a seamless, hands-free listening experience tailored to their mood.

How we built it

For our project, we leveraged the Hugging Face EMO Affect Net model to recognize user emotions in real-time using their desktop camera, all through a custom Chrome extension. The model, integrated into our extension, captures and analyzes facial expressions to detect emotional states seamlessly in the background. We also aimed to connect to the Spotify API to retrieve user information and playlists, enabling us to run a feature extraction model that could analyze both user data and playlists. The goal was to match the detected emotion to an ideal song recommendation, populating the user's queue in real-time for a personalized experience.

Due to connectivity challenges with Spotify’s API, we couldn’t fully integrate the live data feed. Instead, we opted for a curated set of songs pre-assigned to specific emotions, allowing the extension to recommend music that complements the detected mood without a Spotify connection. This workaround maintained the essence of the feature, offering users a dynamic, emotion-driven music experience.

Challenges we ran into

Our primary challenges revolved around image capture functionality and implementing Spotify's OAuth authorization. First, we encountered issues with capturing background images when the extension’s popup was closed. Since the popup typically triggers active processes, closing it halted the image-capturing functionality, requiring us to explore background script solutions to maintain continuous operation.

The second challenge was managing Spotify's OAuth authorization. This involved securely handling token requests, redirection, and storage to maintain access without frequent re-authentication. Instead, we used YouTube videos for the demo as we couldn't fully implement Spotify's OAuth authorization and image capture within the extension.

Accomplishments that we're proud of

Given our inexperience with image capturing and Chrome extension development, we're proud to have successfully brought these components together. Tackling both new technologies at once challenged us to learn quickly, and we’re thrilled with the results we achieved in integrating them seamlessly.

What we learned

We gained a strong understanding of image capturing components, exploring techniques for integrating real-time emotion detection. Additionally, we learned how to work with API keys and manage OAuth authentication, even though we faced challenges with full implementation.

What's next for Mood Music

After successfully integrating the ability to access music from users' API playlists, we aim to enhance the experience by introducing a feature that recommends new and related songs tailored to their preferences. Additionally, we envision developing a hands-free control system that enables users to skip, pause, and like tracks using simple hand gestures, creating an interactive listening experience.

Built With

Share this project:

Updates