← 返回
未分类 中文

Agent Radio

Control internet radio playback with stream/ station search, favorites, volume, pause/resume, stop, next, and show current playback using mpv or ffplay.
使用 mpv 或 ffplay 控制网络电台播放,包括搜索电台、收藏、音量、暂停/继续、停止、下一首及显示当前播放内容。
art-ps art-ps 来源
未分类 clawhub v0.1.1 1 版本 100000 Key: 无需
★ 0
Stars
📥 530
下载
💾 2
安装
1
版本
#latest

概述

Agent Radio Skill

Internet radio player for OpenClaw with station search, favorites, volume control, and playback management.

When to Use

Use when user wants to:

  • Play an internet radio stream by URL
  • Search for stations by name from the live Radio Browser directory
  • Play a random built-in station when no target is provided
  • Manage favorite stations (add, remove, list)
  • Control volume, pause/resume, stop, skip to next
  • Check what is currently playing
  • Have a persistent radio experience across sessions

Tools

This skill provides the following CLI commands in scripts/:

play [volume]

Play a stream by URL or by name from favorites or the built-in list.

If no target is provided, the skill chooses a random station from stations.json.

Optional volume is 0-100 and defaults to the saved setting.

Examples:

  • play https://stream.zeno.fm/0r0xa792kwzuv
  • play BBC Radio 1
  • play "Jazz 24 (KNKX)" 60

stop

Stop playback immediately.

pause

Pause or resume the current playback process.

next

Skip to the next favorite station in a cycle.

volume [level]

Show the current volume or set a new default volume from 0-100.

Examples:

  • volume
  • volume 75

now

Show the current station URL, volume, PID, and playback status.

favorite add

Add a station to favorites.

favorite remove

Remove a station from favorites.

list

List all favorite and built-in stations.

find [number]

Search the Radio Browser directory. When number is provided, play that result immediately.

Examples:

  • find jazz
  • find "lofi hip hop" 1

Configuration

Preferences are stored in: {baseDir}/preferences.json

{
  "last_station": "",
  "volume": 80,
  "favorites": [
    {"name": "BBC Radio 1", "url": "http://..."},
    {"name": "Jazz 24 (KNKX)", "url": "https://..."}
  ],
  "audio_device": "auto",
  "current_pid": null,
  "paused": false
}

Audio device auto-detection:

  • macOS: coreaudio/BuiltInSpeakerDevice
  • Linux: alsa/default
  • Windows: directsound/default

Override locations when needed:

  • AGENT_RADIO_BASE_DIR
  • AGENT_RADIO_PREF_FILE
  • AGENT_RADIO_STATIONS_FILE

Implementation Notes

  • Primary player: mpv --no-video --audio-device= --volume= --cache=yes
  • Fallback player: ffplay -nodisp -autoexit
  • Playback runs in the background and stores PID plus paused state in preferences.
  • On play, any existing playback is stopped before starting the next stream.
  • Station lookup is case-insensitive across favorites and built-in stations.
  • next cycles favorite URLs instead of depending on station-name matching.

Error Handling

  • If both mpv and ffplay are missing, return install guidance.
  • If dependencies like jq or curl are missing, fail early with a clear message.
  • If a stored PID is stale, clear it automatically.
  • If station search returns no matches, explain how to retry with another query or a direct URL.

Examples for Users

/radio play https://stream.zeno.fm/0r0xa792kwzuv
/radio play "BBC Radio 1"
/radio volume 70
/radio now
/radio find jazz
/radio find "lofi hip hop" 1
/radio favorite add "Lounge Jazz" https://jazz.stream
/radio list
/radio next
/radio stop

Future Enhancements

  • Built-in station directory with genres and countries
  • Recording streams to file
  • Equalizer presets
  • Web interface control

版本历史

共 1 个版本

  • v0.1.1 当前
    2026-03-30 13:16 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

design-media

Video Frames

steipete
使用 ffmpeg 从视频中提取帧或短片。
★ 135 📥 53,031
design-media

UI/UX Pro Max

xobi667
提供 UI/UX 设计智能与实现指导,帮助打造精美界面。适用于 UI 设计、UX 流程、信息架构、视觉风格、设计系统/标记、组件规格、文案/微文案、无障碍及前端 UI(HTML/CSS/JS、React、Next.js、Vue、Svelte
★ 221 📥 48,147
design-media

Openai Whisper

steipete
使用 Whisper CLI 进行本地语音转文字(无需 API 密钥)
★ 332 📥 94,209