openclaw 网盘下载
OpenClaw

技能详情(站内镜像,无评论)

首页 > 技能库 > Agent Radio

Control internet radio playback with stream/ station search, favorites, volume, pause/resume, stop, next, and show current playback using mpv or ffplay.

AI 与大模型

作者:Artem Pisarev @art-ps

许可证:MIT-0

MIT-0 ·免费使用、修改和重新分发。无需归因。

版本:v0.1.1

统计:⭐ 0 · 53 · 0当前安装次数· 0历史安装次数

0

安装量(当前) 0

🛡 VirusTotal :良性 · OpenClaw :良性

Package:art-ps/agent-radio

安全扫描(ClawHub)

  • VirusTotal :良性
  • OpenClaw :良性

OpenClaw 评估

The skill appears to do exactly what it claims (play/manage internet radio via mpv/ffplay) and contains only a local Bash CLI implementation; a few small metadata/instruction mismatches are worth noting before installing.

目的

Name/description match the shipped code: scripts/radio.sh implements station search, play/stop/pause/next, favorites, and persistent preferences. The built-in stations and Radio Browser lookup align with the stated purpose.

说明范围

Runtime instructions and the script stay within the radio player domain (reading/writing a preferences file, calling mpv/ffplay, and querying the Radio Browser API). The skill persists state to a preferences.json and accepts environment-variable overrides for base/prefs/stations paths (documented), which is expected for this kind of tool.

安装机制

The registry lists no install spec (instruction-only), and SKILL.md provides optional brew install hints for mpv/ffmpeg. Nothing in the package pulls arbitrary code from unknown URLs or performs disk installs; installation guidance is limited to common package managers.

证书

The script requires jq and curl at runtime (and mpv or ffplay). SKILL.md/metadata declare mpv/ffplay (and brew formulas) but do not declare jq/curl as required binaries — a minor mismatch. No credentials or external secret access are requested.

持久

always is false, the skill only writes its own preferences file and does not modify other skills or system-wide agent settings. It does spawn background player processes (mpv/ffplay) which is expected.

综合结论

This skill is internally consistent with its stated purpose, but check these points before installing: 1) The script needs jq and curl at runtime (and mpv or ffplay) — ensure those are present or available via your package manager. 2) The skill persists a preferences.json and can be pointed (via AGENT_RADIO_BASE_DIR / AGENT_RADIO_PREF_FILE) at a different directory — if you change those, avoid system or sensitive directories. 3) The skill will…

安装(复制给龙虾 AI)

将下方整段复制到龙虾中文库对话中,由龙虾按 SKILL.md 完成安装。

请把本段交给龙虾中文库(龙虾 AI)执行:为本机安装 OpenClaw 技能「Agent Radio」。简介:Control internet radio playback with stream/ station search, favorites, volume,…。
请 fetch 以下地址读取 SKILL.md 并按文档完成安装:https://raw.githubusercontent.com/openclaw/skills/refs/heads/main/skills/art-ps/agent-radio/SKILL.md
(来源:yingzhi8.cn 技能库)

SKILL.md

打开原始 SKILL.md(GitHub raw)

---
name: agent-radio
description: Control internet radio: play streams, search stations, manage favorites, volume, stop/pause/next, and inspect current playback. Uses mpv with audio device auto-detection and ffplay fallback. Settings persist between runs.
user-invocable: true
command-dispatch: tool
command-tool: radio
command-arg-mode: raw
metadata:
  openclaw:
    requires:
      bins:
        - mpv
        - ffplay
    optional:
      bins: []
    install:
      - id: brew-mpv
        kind: brew
        formula: mpv
        label: Install mpv (brew)
      - id: brew-ffmpeg
        kind: brew
        formula: ffmpeg
        label: Install ffmpeg (ffplay)
version: 1.1.1
license: MIT
author: Artem Pisarev
---

# 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 <url|station_name> [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 <name> <url>`
Add a station to favorites.

### `favorite remove <name>`
Remove a station from favorites.

### `list`
List all favorite and built-in stations.

### `find <query> [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`

```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=<device> --volume=<vol> --cache=yes <url>`
- Fallback player: `ffplay -nodisp -autoexit <url>`
- 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

```text
/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

---