⚠️ WARNING: This skill REQUIRES the Internet Radio Music DB skill to work!
Without the stream database skill installed, playback is impossible.
The easiest way to manage playback and the stream database is the internet-radio-music-webui plugin.
The plugin provides an embeddable web panel with:
[embed url="http://127.0.0.1:18789/mplayer"]Install the plugin:
openclaw plugins install "clawhub:internet-radio-music-webui"
openclaw gateway restart
The plugin auto-detects play_music.py and the database scripts from this skill and the Internet Radio Music DB skill.
# 1. Install the stream database skill (required!)
openclaw skills install internet-radio-music-db
# 2. Restart Gateway
openclaw gateway restart
~/.openclaw/skills/internet-radio-music-db/state.json)state.jsonWhen selecting a stream from the database, a 4-level relevance sorting is applied:
genre match (highest priority)Streams with an exact genre match (database field) are always ranked higher than those matched only via the genres list.
genres fieldThe requested genre is searched in the stream's genres list. The closer to the beginning — the higher the priority. If genre matches exactly and genres is empty — position=0 (ideal).
Example: requested ambient
genre=ambient, genres=[] → level=0, position=0 ✅genre=chill, genres=["Ambient", "Chill", "Downtempo"] → level=1, position=0genre=rock, genres=["Downtempo", "Chill", "Ambient"] → level=1, position=2Given equal level and position — the stream with fewer subgenres wins.
All other things being equal — the faster stream is chosen.
(genre_match_level, position, extra_genres, -speed)
Lower value = more relevant stream.
next commandSwitches to the next stream of the same genre from the database (using relevance sorting). Does not switch to a history entry.
| Mood (keywords) | Genres from DB |
|---|---|
| ----------------- | ---------------- |
| calm, sleep, rest, background, meditation | ambient, classical, folk |
| happy, fun, dance, energy | dance, disco, pop, funk, house |
| sad, blues, melancholy | blues, jazz, soul, ambient |
| rock, hard, garage | rock, metal, punk, alternative, indie |
| electronic, synth, lo-fi, dream | electronic, ambient, house, techno |
| classical, orchestra, symphony | classical |
| reggae, tropical, summer | reggae, latin, disco |
| hip-hop, rap, R&B, soul | soul, funk, pop, disco |
| techno, rave, club, trance | techno, house, trance, electronic, dance |
| jazz, swing | jazz, blues, soul |
| country, western, folk | country, folk |
| lounge, chill-out | ambient, jazz, indie, folk, chill, lounge, downtempo, relaxation |
| metal, heavy, power, aggression | metal, punk, rock |
| 80s, 90s, retro, nostalgia | 80s, 90s, oldies, disco, pop |
| indie, alternative, experimental | indie, alternative |
| latin, salsa, bachata, brazil | latin |
| pop, popular, hits | pop, top-40 |
| work, focus, study | ambient, classical, electronic |
| party, dancefloor | dance, house, techno, pop, funk, disco |
| sunset, chill, evening, lounge | ambient, jazz, indie, folk, chill, lounge, downtempo, relaxation |
| news, talk, podcast | news, talk |
| gospel, church, spiritual | gospel, classical, ambient |
| Command | Action |
|---|---|
| --------- | -------- |
| "Play music" | Play ambient (by default) |
| "Play [mood] music" | Determine genre and play |
| "Play jazz" / "Play sad music" | Jazz / blues |
| "Play happy music" | Dance / disco / pop |
| "Play music for sleeping" | Ambient / classical |
| "Play rock" / "Play heavy music" | Rock / metal |
| "Play electronic music" | Electronic / techno |
| "Play reggae" / "Play summer music" | Reggae / latin |
| "Play classical" | Classical |
| "Play 80s music" | 80s |
| "Next" / "Other stream" | Next stream of same genre |
| "Previous" / "Back" | Return to previous stream |
| "Play what was playing" / "Last stream" | Play the most recent stream from all history |
| "Stop" | Stop playback |
| "What's playing?" / "Status" | Show current stream |
| "History" / "Playback list" | Show history |
Music Stream Database (~/.openclaw/skills/internet-radio-music-db/):
failed_checks >= 3 are automatically removed from the database| File | Purpose |
|---|---|
| ------ | --------- |
scripts/play_music.py | Main playback script (play/stop/next/prev/resume/status/history) |
scripts/show_history.py | Detailed playback history with filters and export (CSV/HTML/JSON) |
state.json | Current genre, playback history, current stream |
~/.openclaw/skills/internet-radio-music-db/state.json | Stream database (managed by Internet Radio Music DB skill) |
C:\Program Files\foobar2000\ or C:\Program Files (x86)\foobar2000\)play after stop — auto-resume: if playback was stopped via stop, pressing play without specifying a mood/genre resumes the last played stream from history instead of starting a new random one. State tracks Stopped flag to distinguish between "never played" and "explicitly stopped".--mood default from "ambient" to None — allows detecting when no genre was explicitly requested by the user. Internal fallback to "ambient" still applies when playing a new stream.cmd_play signature: entered genre always resets Stopped flag, ensuring explicit genre requests always start fresh.random.shuffle — previously, streams were shuffled after relevance sorting, causing multi-genre streams with a different primary genre (e.g. dance) to play instead of pure genre matches (e.g. country). Now the relevance order is always respected: pure genres first, multi-genre second.genre match (exact > only in genres > none)genres field (closer to start = better)next command — now selects a stream from the database by current stream's genre (instead of random history switching). Uses the same relevance logic as playstop → play within the running player instead of taskkill + restartgenres — if genre matches exactly and genres is empty, stream gets position=0 (ideal match)genre/genres, breaking sort ordergenres fieldProgram Files and Program Files (x86)lounge genre to mood map (chill/sunset/evening pattern)genres as string — parsing via comma and semicolon共 4 个版本