A fully voice-controlled music player powered by the free Audius decentralized music platform. Ask for songs by name, artist, genre, mood, or vibe — it finds the best match, streams it live, and lets you manage a favorites list. No API key required.
The ability uses structured LLM prompts to parse user requests:
async def check_song_request(self, message: str) -> dict: """Check if the message contains a song request""" check_prompt = f""" You are a DJ assistant. Your job is to analyze the user's request and return a JSON object... ### INTENTS (choose only one): - "direct_play" - "stop" - "pause" - "resume" - "add_to_favorites" - "remove_from_favorites" - "play_favorites" - "conversation" """ response = self.capability_worker.text_to_text_response(check_prompt, []) return json.loads(response)
Persistent favorites storage with add/remove operations:
elif intent == "add_to_favorites": gc = self.capability_worker.get_single_key("global_context").get("value", {}) song_id = gc.get("last_song_id") song_message = gc.get("last_played_message") if song_id: favorites = self.capability_worker.get_single_key("favorites").get("value", []) if not any(fav["song_id"] == song_id for fav in favorites): favorites.append({"song_id": song_id, "song_message": song_message}) self.capability_worker.update_key("favorites", favorites) await self.capability_worker.speak("Song added to your favorites.") else: await self.capability_worker.speak("This song is already in your favorites.")
User: play musicAI: (listens for request)User: play something chill by Frank OceanAI: I am searching a song for you, please wait! Now playing Thinking Bout You by Frank Ocean. (song streams) What would you like me to do next?
Say “play something similar” to continue with music that matches your current mood!