Inspiration
Most playlist tools optimize for "songs I might like," but not "how I need to feel next." We wanted to build something emotionally intentional: a system that takes a user's current state, maps a target emotional outcome, and creates a playlist that gradually bridges the gap instead of jumping abruptly.
What it does
Spotify MoodMix creates personalized Spotify playlists based on emotional transition.
Users log in with Spotify, describe their current mood, and describe how they want to feel. The app then:
- Converts that input into a start and end mood vector.
- Builds a multi-stage mood arc between those states.
- Selects tracks from a large Spotify audio-feature dataset to match each stage.
- Creates a new Spotify playlist and adds the selected tracks automatically.
Users can control the total track count.
How we built it
The frontend is a lightweight web app (HTML/CSS/JavaScript) with a guided flow for mood input, goal input, and playlist controls.
The backend is built with FastAPI and handles OAuth, mood scoring, arc planning, track selection, and playlist creation.
Mood scoring uses structured OpenAI outputs, with deterministic local fallback logic when model calls are unavailable.
Arc planning uses linear interpolation across normalized audio features: valence, energy, danceability, tempo, acousticness, and instrumentalness.
Track selection uses Pandas to filter and sample from ~114k tracks while expanding tolerances when matches are sparse, de-duplicating tracks, and preserving stage order.
Spotify integration uses OAuth and playlist APIs to create and populate playlists in the user's account.
Challenges we ran into
There is no bias for songs in the a specific language, which results in a large number of songs being not in English.
OAuth and session reliability across localhost hostnames and callback redirects was tricky and required careful state/session handling.
Mapping freeform emotional language into stable numeric audio targets required balancing AI scoring with robust fallback behavior.
Accomplishments that we're proud of
An end-to-end one-click flow from emotional prompt to a real Spotify playlist.
A robust staged transition model instead of a single-point recommendation.
Reliable fallback behavior when external model calls fail.
Clear UX controls for mood transition granularity and playlist length.
What we learned
How to combine LLM-generated structure with deterministic algorithmic planning.
How sensitive emotional UX is to transition smoothness, not just track relevance.
How important production-grade OAuth/session handling is, even in a hackathon timeline.
What's next for Spotify MoodMix
Add biasing for the users preferred language
Create a native iOS app so that users can create their playlists on the go
Add post-playlist feedback loops so users can rate how well each stage worked and improve future arcs.
Incorporate listening history and skip behavior to personalize arc shape and track ranking.
Built With
- css3
- html5
- javascript
- openaiapi
- python
Log in or sign up for Devpost to join the conversation.