P O R T F O L I O   E X P E R T

SpotyMood: What Your Spotify Playlist Says About Your Mood

Turning your listening history into an emotional dashboard

We don’t always recognize what we’re feeling. But our playlists might.

That’s the idea behind SpotyMood, a personal project I’ve been building—a proof of concept that analyzes your Spotify listening history to help you understand your emotional patterns. It’s not released publicly yet, but the prototype is running: it authenticates via Spotify, fetches your listening data, and maps out your musical mood over time.

What surprised me as I built it is how closely this idea intersects with real mental health research. In fact, I wrote an entire article about it:
👉 Music and Depression: Can Your Playlist Track Your Mood?

Let’s dive deeper.


🎧 SpotyMood: Music Meets Mood Analytics

At its core, SpotyMood is an emotional analytics tool powered by music. It fetches recently played tracks and analyzes each one based on:

  • Valence – How happy or sad the song feels
  • Energy – How intense or subdued the track is
  • Lyrics – What themes or emotions the words express

It then visualizes your mood across hours, days, or months using clear, color-coded graphs.

You can view:

  • Mood evolution over time
  • Histograms of common emotional states
  • Your most emotional artists, songs, and albums
  • Friend comparisons (multi-user mode)
  • Lyrics-based emotional themes

It’s built using Python (FastAPI), PostgreSQL, and Docker—easy to deploy, analyze, and extend.


🚫 When Spotify Broke the API

Originally, SpotyMood leaned on Spotify’s audio features API to get metrics like valence and energy.

But at the end of 2024, Spotify began quietly restricting this endpoint for non-commercial apps—resulting in frustrating 403 errors. My request for extended access has been stuck in “draft” since November 2023.

And I’m not the only one. Developers across Reddit and the Spotify Developer Forum have run into the same wall.

So I started exploring an open-source plan B.

🧱 Why Spotify Is Locking Down Emotional Data

So why is Spotify suddenly gatekeeping access to this emotional metadata?

One likely reason: monetization.

Spotify has been doubling down on AI-powered playlists—like Focus, Energize, and Daylist—which rely heavily on the same audio features they’ve now restricted from public use. By limiting access to these emotional descriptors (valence, energy, danceability, etc.), Spotify keeps a key advantage in-house.

In short: the better you understand how music affects mood, the more powerful your recommendation engine becomes. And the more you can personalize listening experiences, the more valuable you are as a user (and as data).

It’s not surprising. But it is frustrating—especially for indie developers and researchers trying to build ethical, user-first tools like SpotyMood.

If Spotify’s emotional intelligence is a walled garden, maybe it’s time we started building our own.


🔍 Switching to Essentia: Open, Local, Flexible

Essentia, an open-source audio analysis toolkit, offers a powerful alternative. Developed by the Music Technology Group in Barcelona, it can analyze:

  • Valence
  • Arousal
  • Mood
  • Genre
  • BPM and rhythm

The catch? You need access to full audio files and a way to process and store those features yourself. That makes it way more complex technically—but also platform-agnostic, which is a long-term win.


🧠 Music as a Window Into Mental Health

The more I read, the more I realized: this isn’t just a data project. It’s personal.

Music and mental health are deeply connected—as I explored in this article. Research now shows that music listening patterns can reflect, and even predict, emotional states like depression or anxiety.

Some key findings:

  • Low-valence music spikes before depressive episodes
  • Teens sometimes use music maladaptively to intensify negative feelings
  • Spotify data can be used to predict depression with high accuracy
  • Tools like this could support early detection and passive mood tracking

So SpotyMood isn’t just for curiosity. It could become a kind of Fitbit for your emotions, revealing patterns that traditional journaling might miss.


💡 What Makes SpotyMood Different

Most Spotify stats tools show you your “top 10” tracks or favorite genre.

SpotyMood asks better questions:

  • Do I listen to sad music more during stressful weeks?
  • Which artists consistently lift—or lower—my mood?
  • What’s the emotional rhythm of my day, week, or month?

It doesn’t just track what you like. It tracks how you feel.

And if we get this right—with privacy, design, and intent in mind—it could help users see themselves more clearly.


🧱 The Stack Behind the Scenes

Backend: Python (FastAPI)
Frontend: React
Database: PostgreSQL
Infra: Docker + Docker Compose
Security: OAuth2 login, encrypted tokens, GDPR-compliant deletion
Features: Mood graphs, lyrics, multi-user, export tools


🚀 Where It Stands

Right now, SpotyMood is:

✅ Authenticated via Spotify
✅ Fetching listening history
✅ Visualizing mood with cached emotional data
⚠️ Blocked from fresh emotional metrics due to API restriction
🔍 Exploring Essentia to regain control of analysis

It’s not public yet, but the bones are solid—and I’m excited to keep pushing it forward.


Why Arousal Might Be the Next Step Toward Accuracy

While many existing models for mood detection using music focus on valence alone—i.e., whether songs sound happy or sad—this approach only tells half the story. Emotional experiences are multidimensional, and arousal adds a crucial layer of nuance.

For example, two songs could both score low on valence (suggesting sadness), but differ dramatically in arousal: one could be calm and melancholic, the other tense and agitated. These distinctions matter, especially when trying to predict or understand mental health states like depression or anxiety.

Incorporating arousal data alongside valence would allow systems to distinguish between emotional states like:

  • Lethargic sadness vs. restless irritability
  • Peaceful joy vs. euphoric mania

Such granularity could significantly improve the accuracy of mood predictions, especially when combined with other behavioral signals. For platforms like Spotify, this data already exists. The next frontier lies in interpreting these dimensions together—to move from generic sentiment detection to truly personalized emotional insight.

🎵 Final Thought: Your Music Already Knows

Spotify might not be talking, but your music is.

Whether it’s a sudden obsession with sad acoustic tracks or a late-night playlist you keep returning to, your listening history can be a reflection—a mood mirror that shows you something your conscious mind hasn’t quite caught up with yet.

Projects like SpotyMood are still in their early days. But the promise is clear:

Your playlists might be telling a story.

The real question is—are you listening?

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *