FridayMusic: AI-driven mood-based playlist for Fridays

Every Friday at 6 PM PT, I finish my work week, and play 90 minutes of my music of choice at near concert levels in my dedicated audio room while enjoying a cocktail.

I also have the habit of writing extensive daily notes in Obsidian. It turns out that AI can be pretty good picking the “mood” of the week by analyzing the notes, so I wrote this program that automatically determines the mood, and based on my general preferences, it generates a playlist along with cocktail recommendation, also based on the mood.

In the perfect world, I would have created a dynamic playlist, but the Roon API is pretty limited, so I trigger a 90-minute play directly to the queue.

I wrote this mostly as a proof of concept for me some time ago when I was still learning DSPy, which is the AI framework I use to write production-grade applications, but after a Tweet 2 days ago, I decided to clean it up and release the code, in case it can be useful to anyone else. Cheers.

5 Likes

@Ramiro_Salas Awesome project and what a great way to finish the week! :heart:

If you like I could guide you to get it working with AI Guest DJ for storing the playlist. The result would be a playlist like this which you can then use to play in Roon (or save in Plex). One advantage (next to it being saved) is that you can select different versions of songs.

Thanks. The thing is that I have no issue generating the playlist. That’s the easy part. In fact, I can get excellent result even using local 7B models via Ollama. The issue is the Roon API, that doesn’t allow me to programmatically create one, so I have to write directly to the queue. I could write a back-end server that will act as a player directly, but I think I already took this as far as I want to take it, at least until I get some time.