Music pipeline / MuzicAI
Mood-aware daily mixes in Plexamp, part algorithmic and part LLM-curated, plus ListenBrainz-driven discovery.
- Status
- Running
- Tags
- Stack
- Python
- PlexAPI
- Anthropic SDK
- Groq
- Deezer API
- ListenBrainz
- Explo
- Multi-Scrobbler
- cron
The problem
My library is big and very multilingual: Romanian, Moldovan, Russian-language rap, metal, EDM. Streaming-style "daily mixes" don't exist for a self-hosted library, and the ones I've seen elsewhere don't understand half of what I listen to.
What I built
A set of Python jobs that run on cron:
- Daily mixes in Plexamp, built with PlexAPI and shaped by mood, partly by rules and partly curated by an LLM (MuzicAI, using the Anthropic SDK and Groq).
- Listening history goes to ListenBrainz through Multi-Scrobbler.
- Discovery with Explo, driven by ListenBrainz recommendations, and the Deezer API fills in metadata.
- Cyrillic-aware matching.
unidecodehandles transliteration so the same artist isn't treated as two different ones.
Lessons
- Stable IDs, not string matching. Artist names in two alphabets taught me that titles are a terrible join key.
- Idempotent pipelines. Every job can run twice without making a mess.
Status
Running daily. The MuzicAI dry run is pending.