界面已本地化;技能介绍与说明文档按所选语言由 AI 自动翻译,代码、命令、路径和专业术语保留原文,以原作者文档为准。
探索技能
效率与协作 · SKILL.md

announcer

announcer

【效率与协作】Announce text throughout the house via AirPlay speakers using Airfoil + ElevenLabs TTS.

独立 GitHub 快照 · 自动分类 · 以原作者文档为准

技能说明

GitHub

name: announcer description: "Announce text throughout the house via AirPlay speakers using Airfoil + ElevenLabs TTS." summary: "House-wide TTS announcements via AirPlay speakers, Airfoil, and ElevenLabs." version: 1.1.0 homepage: https://github.com/odrobnik/announcer-skill metadata: { "openclaw": { "emoji": "📢", "requires": { "bins": ["python3", "ffmpeg"], "apps": ["Airfoil"], "env": ["ELEVENLABS_API_KEY"], "skills": ["elevenlabs"] }, }, }

Announcer

Play TTS announcements through AirPlay speakers via Airfoil and ElevenLabs.

How It Works

  1. Generate speech via ElevenLabs (high-quality opus → stereo MP3)
  2. Connect to AirPlay speakers via Airfoil
  3. Play an optional chime (gong) followed by the announcement
  4. Disconnect speakers after playback

Requirements

  • Airfoil (Rogue Amoeba) — running on the host Mac
  • ElevenLabs API key — set ELEVENLABS_API_KEY env var
  • ffmpeg — for audio format conversion
  • elevenlabs skill — sibling skill for TTS generation

Configuration

User config lives at ~/clawd/announcer/config.json:

{
  "speakers": ["Living (2)", "Kitchen", "Office"],
  "excluded": ["Computer"],
  "elevenlabs": {
    "voice_id": "your-voice-id",
    "format": "opus_48000_192"
  },
  "audio": {
    "output_format": "mp3",
    "stereo": true,
    "sample_rate": 48000,
    "bitrate": "256k",
    "chime_file": "gong_stereo.mp3"
  },
  "airfoil": {
    "source": "System-Wide Audio",
    "connection_timeout_seconds": 30,
    "volume": 0.7
  }
}

Config Fields

FieldDescription
speakersAirPlay speaker names to connect
excludedSpeaker names to never connect
elevenlabs.voice_idElevenLabs voice to use
audio.chime_fileChime sound file in assets/ (set null to disable)
airfoil.connection_timeout_secondsTime to wait for speakers to connect
airfoil.volumeSpeaker volume (0.0–1.0)

Usage

# Announce to all configured speakers
python3 skills/announcer/scripts/announce.py "Dinner is ready!"

# Announce to specific speakers only
python3 skills/announcer/scripts/announce.py "Wake up!" --speakers "Kids Room"

# Skip the chime
python3 skills/announcer/scripts/announce.py "Quick note" --no-gong

File Structure

announcer/
├── SKILL.md
├── assets/
│   └── gong_stereo.mp3      # Announcement chime
└── scripts/
    └── announce.py           # Main announcement script

User config (not part of skill):

~/clawd/announcer/
└── config.json               # Speaker list, voice, audio settings
我的收藏