Inspiration
OffBeat started from the feeling that some songs in a playlist just don’t fit, even if you can’t quite say why. We wanted a way to make that intuition visible with data - using mood, energy, and tags instead of just genre or popularity. Losing access to Spotify’s built‑in audio features pushed us to get creative with ReccoBeats and Last.fm, which turned into a much more interesting data‑fusion problem than we expected.
What it does
OffBeat lets you log in with Spotify, pick one or more playlists, and then analyzes every track to understand the playlist’s core moods and outliers. It builds mood clusters (like high‑energy happy or low‑energy mellow), flags “off‑beat” anomalies whose mood doesn’t match the rest, compares mood profiles across playlists, and surfaces songs that match a mood you choose. On top of that, it can generate anomaly‑based and mood‑based recommendations and create new Spotify playlists from any of these results. In this app, anomalies aren't "bad" or "negative", they are just indicators of things that are unusually different about your listening habits.
How we built it
We use the Spotify API for auth and playlist/track metadata, then enrich each track into an EnrichedTrack object with audio features from ReccoBeats and social tags from Last.fm. These are stored as Python dataclasses and fed into a Sphinx‑driven analysis notebook that builds feature matrices, runs clustering, computes anomaly scores, and produces JSON‑serializable “insights” for the backend. The web app uses these insights to power actions like analysis, comparisons, mood selection, and to build payloads for Last.fm/ReccoBeats recommendation APIs, while the Spotify Web API handles creating playlists from the selected or recommended tracks. Our database is Pocketbase, an SQLite system.
Challenges we ran into
The biggest early challenge was Spotify’s deprecated audio‑features endpoint, which forced us to rethink how to get mood‑relevant data and stitch together multiple APIs reliably. On the ML side, designing clustering and anomaly logic that works with partial data (tracks missing audio features or tags) without silently biasing results took careful handling. We also had to iterate on how to structure the analysis functions and outputs so Sphinx could generate robust code and our backend could consume it cleanly.
Accomplishments that we're proud of
We’re proud that OffBeat goes beyond a simple “playlist stats” dashboard and actually fuses three data sources into a unified mood representation that feels intuitive to users. Getting a combined analysis action that outputs mood clusters, anomaly scores, and human‑readable explanations is a nice milestone. We’re also proud of our Sphinx integration: using it as a notebook‑level agent to implement and refine the analysis pipeline saved a lot of dev time and gave us a clean, reusable set of analysis functions.
What we learned
We learned how fragile it can be to depend on a single provider’s features and how valuable it is to design with interchangeable data sources in mind. Practically, we picked up experience in building feature spaces from heterogeneous data (numeric audio features + social tags), clustering playlists in a way that’s explainable to non‑technical users, and using an AI agent (Sphinx) effectively by giving it precise specs and test data. We also got a better feel for how to structure APIs and JSON contracts so data science code and product code can evolve independently.
What's next for OffBeat
Next, we want to improve the mood taxonomy and labeling so clusters have richer, user‑friendly names, and experiment with better visualizations of mood flows within a playlist. We’d also like to tighten the recommendation loop by learning from user feedback on suggested replacements and mood‑based recs. Longer term, we see OffBeat expanding beyond Spotify to support other music platforms, and turning the Sphinx chatbot into a full “playlist copilot” that can dynamically run analyses and build custom playlists in response to natural‑language requests.
Built With
- api
- cloudflare
- docker
- ipynb
- last.fm
- pocketbase
- python
- sphinx
- spotify
- traefik

Log in or sign up for Devpost to join the conversation.