Agent Speak Skill
Description
讓 AI Agent 用語音回答你 — 免費 Edge-TTS 串流語音回覆技能(Claude Code/Codex/OpenCode/AntiGravity 通用,零金鑰、首聲約 1-2 秒、無視窗)
Installation
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open the source below and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
README
agent-speak-skill 🔊
讓你的 AI Agent「用語音回答你」——免費 Edge-TTS 串流語音回覆技能。
Free voice-reply skill for AI agents (Claude Code / Codex / OpenCode / AntiGravity) — streams Edge-TTS audio inline, first sound in ~1–2 seconds, no API key, no window pop-ups.
特色
- ⚡ 串流播放:音訊邊生成邊播,首聲約 1–2 秒(不必等整個音檔生完)
- 🆓 零金鑰、零費用:走 Edge 瀏覽器「大聲朗讀」的微軟雲端語音(edge-tts)
- 🪟 行內無視窗:ffplay/mpv 管道播放,不會跳出任何播放器視窗
- 🛡️ 三層備援:串流 → 整檔(WPF MediaPlayer/WMPlayer COM)→ 離線 Windows SAPI,斷網也出得了聲
- 🗣️ 預設台灣中文男聲
zh-TW-YunJheNeural,一個參數換任何 Edge-TTS 聲音 - 🤝 四個 Agent 通用:同一份技能資料夾,Claude Code、Codex、OpenCode、AntiGravity 都能用
需求
| 項目 | 說明 |
|---|---|
| Windows 10/11 | 播放備援用到 WPF/SAPI(核心生成跨平台,播放層目前為 Windows) |
| PowerShell 7(pwsh) | winget install Microsoft.PowerShell |
| Python 3.8+ + edge-tts | pip install edge-tts |
| ffmpeg(含 ffplay)或 mpv | 串流播放用;沒有也能動(自動退到整檔模式)。winget install Gyan.FFmpeg |
安裝(可下載 ZIP,不一定要 git clone)
把 `speak/` 資料夾整個複製到你所用工具的技能目錄:
| Agent | 技能目錄 |
|---|---|
| Claude Code | ~/.claude/skills/speak/ |
| Codex | ~/.agents/skills/speak/ |
| AntiGravity | ~/.agents/skills/speak/(與 Codex 共用) |
| OpenCode | ~/.config/opencode/skills/speak/ |
裝好後對你的 Agent 說:**「用語音回答我」**、「唸出來」、「唸給我聽」即可觸發。
手動使用
# 基本:串流唸出一段話
pwsh -NoProfile .\speak\speak.ps1 "你好,這是語音回覆測試。"
# 換聲音(任何 edge-tts 支援的 voice)
pwsh -NoProfile .\speak\speak.ps1 "換個女聲試試。" -Voice zh-TW-HsiaoChenNeural
# 保留音檔(走整檔模式)
pwsh -NoProfile .\speak\speak.ps1 "這段要存起來。" -Out D:\out\reply.mp3
# 長稿從檔案讀
pwsh -NoProfile .\speak\speak.ps1 -File .\講稿.txt
可用聲音清單:`edge-tts --list-voices`
運作原理
文字講稿 ─→ edge-tts 串流 API ─→ 音訊 chunk ─→ ffplay/mpv stdin(邊收邊播)
│ 失敗時
├─→ 整檔 mp3 → WPF MediaPlayer/WMPlayer COM(無視窗)
│ 再失敗(離線)
└─→ Windows SAPI 本機合成(零依賴)
檔案
speak/SKILL.md— 技能說明(Agent 讀這份決定何時觸發、怎麼呼叫)speak/speak.ps1— 主腳本(模式選擇+備援鏈)speak/speak_stream.py— Edge-TTS 串流播放器
注意
- Edge-TTS 為非官方管道,
Related Skills
Agency Agents
A complete AI agency at your fingertips - From frontend wizards to Reddit community ninjas, from whimsy inject
AI Awesome Llm Apps
100+ AI Agents, Agent Skills and RAG Apps - Free and Open Source.
AI Firecrawl
🔥 The API to search, scrape, and interact with the web for AI
AI Artifacts Builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web tech
AI Headroom
Compress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agen
AI CrewAI
Framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewA
AI