{"id":"5e16ac75-69bc-4c8b-b1b6-4a7babc94c85","entityType":"agent","slug":"clawhub-moroiser-tts-synthesizer","name":"TTS Synthesizer | TTS 合成器","canonicalUrl":"https://www.xpersona.co/agent/clawhub-moroiser-tts-synthesizer","canonicalPath":"/agent/clawhub-moroiser-tts-synthesizer","generatedAt":"2026-10-11T14:15:07.786Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"editorial-content","verified":true,"confidence":"high","updatedAt":"2026-10-11T10:27:11.793Z","emptyReason":null},"description":"文字转语音（Text-to-Speech / TTS）工具。 支持 edge-tts（微软神经网络 TTS，在线合成）和 OpenAI 兼容 API TTS。 触发词：语音回复、TTS、文字转语音、语音合成、语音对话。 适用平台：Linux / Windows / macOS。 Skill: TTS Synthesizer | TTS 合成器 Owner: moroiser Summary: 文字转语音（Text-to-Speech / TTS）工具。 支持 edge-tts（微软神经网络 TTS，在线合成）和 OpenAI 兼容 API TTS。 触发词：语音回复、TTS、文字转语音、语音合成、语音对话。 适用平台：Linux / Windows / macOS。 Tags: latest:1.0.9 Version history: v1.0.9 | 2026-04-29T14:52:50.848Z | user test v1.0.8 | 2026-04-29T14:08:54.737Z | user 1. Fix all internal path references and display names to match the renamed tts-synthesizer slug. 修复","descriptionLabel":"Technical summary","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 1.1K downloads reported by the source. Last updated 10/11/2026.","installCommand":"clawhub skill install s1708w2t7w31qf7b0gsy7kamnx83gqa6:tts-synthesizer","sourceUrl":"https://clawhub.ai/moroiser/tts-synthesizer","homepage":"https://clawhub.ai/moroiser/skills/tts-synthesizer","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/moroiser/tts-synthesizer","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/moroiser/skills/tts-synthesizer","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":61,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"文字转语音（Text-to-Speech / TTS）工具。 支持 edge-tts（微软神经网络 TTS，在线合成）和 OpenAI 兼容 API TTS。 触发词：语音回复、TTS、文字转语音、语音合成、语音对话。 适用平台：Linux / Windows / macOS。 Skill: TTS Synthesiz"},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-11T10:27:11.793Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[],"verifiedCount":0,"selfDeclaredCount":1,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile"}},"adoption":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-11T10:27:11.793Z","emptyReason":null},"stars":null,"forks":null,"downloads":1088,"packageName":null,"latestVersion":"1.0.9","tractionLabel":"1.1K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-11T10:27:11.727Z","emptyReason":null},"lastUpdatedAt":"2026-10-11T10:27:11.793Z","lastCrawledAt":"2026-10-11T10:27:11.727Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-12T10:27:11.727Z","lastVerifiedAt":null,"highlights":[{"version":"1.0.9","createdAt":"2026-04-29T14:52:50.848Z","changelog":"test","fileCount":6,"zipByteSize":9485},{"version":"1.0.8","createdAt":"2026-04-29T14:08:54.737Z","changelog":"1. Fix all internal path references and display names to match the renamed tts-synthesizer slug. 修复所有内部路径引用和展示名，统一为新命名的 tts-synthesizer。","fileCount":5,"zipByteSize":8310},{"version":"1.0.7","createdAt":"2026-04-29T14:01:19.344Z","changelog":"1. Rename the skill from speech-synthesizer to tts-synthesizer and update the bilingual display name. 将技能从 speech-synthesizer 重命名为 tts-synthesizer，并更新中英文双语展示名。","fileCount":5,"zipByteSize":8319},{"version":"1.0.6","createdAt":"2026-04-12T09:56:46.781Z","changelog":"Fix offline claim: edge-tts requires internet to contact Microsoft servers; updated description and table to reflect online-only nature. 修复离线描述错误：edge-tts 需联网微软服务器合成，已更正文档和表格。","fileCount":5,"zipByteSize":8319},{"version":"1.0.5","createdAt":"2026-04-12T09:35:09.995Z","changelog":"Fix output path from tts/ to speech-synthesizer/","fileCount":5,"zipByteSize":8449},{"version":"1.0.4","createdAt":"2026-04-12T09:25:02.794Z","changelog":"1. Update SKILL.md: remove obsolete models directory note. 更新 SKILL.md，移除过时的 models 目录说明。 2. Clarify edge-tts runs online (no local model). 明确 edge-tts 无本地模型（联网运行）。 3. Project directory unified to projects/speech-synthesizer/. 项目目录统一为 projects/speech-synthesizer/。","fileCount":5,"zipByteSize":8303},{"version":"1.0.3","createdAt":"2026-04-05T15:06:16.034Z","changelog":"1. Add av to requirements.txt. Add ffmpeg system dependency note. Add _meta.json with env declarations.","fileCount":5,"zipByteSize":8122},{"version":"1.0.2","createdAt":"2026-04-03T15:04:38.454Z","changelog":"Update publishing configuration. 优化发布配置。","fileCount":5,"zipByteSize":7945}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s1708w2t7w31qf7b0gsy7kamnx83gqa6:tts-synthesizer","setupComplexity":"medium","setupSteps":["Python environment detected. Create a strict virtual environment (`python -m venv .venv`) before installing dependencies to prevent system-level package conflicts.","Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.","Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-moroiser-tts-synthesizer/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-moroiser-tts-synthesizer/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-moroiser-tts-synthesizer/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-moroiser-tts-synthesizer/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-moroiser-tts-synthesizer/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-moroiser-tts-synthesizer/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-11T14:15:07.784Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-moroiser-tts-synthesizer/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-moroiser-tts-synthesizer/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-moroiser-tts-synthesizer/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-moroiser-tts-synthesizer/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"high","updatedAt":"2026-10-11T10:27:11.793Z","emptyReason":null},"readme":"Skill: TTS Synthesizer | TTS 合成器\n\nOwner: moroiser\n\nSummary: 文字转语音（Text-to-Speech / TTS）工具。 支持 edge-tts（微软神经网络 TTS，在线合成）和 OpenAI 兼容 API TTS。 触发词：语音回复、TTS、文字转语音、语音合成、语音对话。 适用平台：Linux / Windows / macOS。\n\nTags: latest:1.0.9\n\nVersion history:\n\nv1.0.9 | 2026-04-29T14:52:50.848Z | user\n\ntest\n\nv1.0.8 | 2026-04-29T14:08:54.737Z | user\n\n1. Fix all internal path references and display names to match the renamed tts-synthesizer slug. 修复所有内部路径引用和展示名，统一为新命名的 tts-synthesizer。\n\nv1.0.7 | 2026-04-29T14:01:19.344Z | user\n\n1. Rename the skill from speech-synthesizer to tts-synthesizer and update the bilingual display name. 将技能从 speech-synthesizer 重命名为 tts-synthesizer，并更新中英文双语展示名。\n\nv1.0.6 | 2026-04-12T09:56:46.781Z | user\n\nFix offline claim: edge-tts requires internet to contact Microsoft servers; updated description and table to reflect online-only nature. 修复离线描述错误：edge-tts 需联网微软服务器合成，已更正文档和表格。\n\nv1.0.5 | 2026-04-12T09:35:09.995Z | user\n\nFix output path from tts/ to speech-synthesizer/\n\nv1.0.4 | 2026-04-12T09:25:02.794Z | user\n\n1. Update SKILL.md: remove obsolete models directory note. 更新 SKILL.md，移除过时的 models 目录说明。\n2. Clarify edge-tts runs online (no local model). 明确 edge-tts 无本地模型（联网运行）。\n3. Project directory unified to projects/speech-synthesizer/. 项目目录统一为 projects/speech-synthesizer/。\n\nv1.0.3 | 2026-04-05T15:06:16.034Z | user\n\n1. Add av to requirements.txt. Add ffmpeg system dependency note. Add _meta.json with env declarations.\n\nv1.0.2 | 2026-04-03T15:04:38.454Z | user\n\nUpdate publishing configuration. 优化发布配置。\n\nv1.0.1 | 2026-04-03T12:59:20.545Z | user\n\nRemove redundant references/ directory. Consolidate deployment and platform notes into SKILL.md. 精简文档，删除冗余的 references/ 目录，将部署和平台说明合并至 SKILL.md。\n\nv1.0.0 | 2026-04-02T02:26:47.898Z | user\n\nInitial release. 首次发布。\n\nArchive index:\n\nArchive v1.0.9: 6 files, 9485 bytes\n\nFiles: _meta.json (134b), requirements.txt (1362b), scripts/tts_edge.py (4520b), scripts/tts_simple.py (6941b), skill-card.md (2131b), SKILL.md (7666b)\n\nFile v1.0.9:SKILL.md\n\n---\nname: TTS Synthesizer | TTS 合成器\ndescription: |\n  文字转语音（Text-to-Speech / TTS）工具。\n  支持 edge-tts（微软神经网络 TTS，在线合成）和 OpenAI 兼容 API TTS。\n  触发词：语音回复、TTS、文字转语音、语音合成、语音对话。\n  适用平台：Linux / Windows / macOS。\n---\n\n# TTS Synthesizer | TTS 合成器 🔊\n\n将文字转换为语音，支持微软神经网络 TTS（联网合成）和 OpenAI 兼容 API。\n\n## 目录\n\n1. [概述](#概述)\n2. [快速开始](#快速开始)\n3. [脚本说明](#脚本说明)\n4. [声音列表](#声音列表)\n5. [输出目录](#输出目录)\n6. [环境变量](#环境变量)\n7. [故障排查](#故障排查)\n\n---\n\n## 概述\n\n> ⚠️ **注意**：OpenClaw 内置了 `tts` 工具，但它的输出格式（MP3/WebM）不适合直接发送飞书语音。\n> **飞书语音消息必须用 `tts_simple.py`**，它会自动输出 OGG/Opus 格式。\n\n### 支持的 TTS 引擎\n\n| 引擎 | 说明 | 优点 | 缺点 |\n|------|------|------|------|\n| `edge` ⭐ | 微软神经网络 TTS | 免费、联网合成、高音质、支持中文 | 需访问微软服务 |\n| `api` | OpenAI 兼容 API | 质量高、可选声音多 | 需要 API Key |\n\n### edge-tts 支持的声音（完整列表）\n\n**中文（大陆）**:\n| 声音 | 风格 |\n|------|------|\n| `zh-CN-XiaoxiaoNeural` | 晓晓（女声，**默认**）|\n| `zh-CN-YunxiNeural` | 云希（男声）|\n| `zh-CN-YunyangNeural` | 云扬（男声）|\n| `zh-CN-XiaoyiNeural` | 晓伊（女声）|\n\n**中文（台湾）**:\n| 声音 | 风格 |\n|------|------|\n| `zh-TW-HsiaoYuNeural` | 小宇（女声）|\n\n**英文**:\n| 声音 | 风格 |\n|------|------|\n| `en-US-JennyNeural` | 美式女声 |\n| `en-US-GuyNeural` | 美式男声 |\n| `en-GB-SoniaNeural` | 英式女声 |\n| `en-GB-RyanNeural` | 英式男声 |\n| `en-AU-NatashaNeural` | 澳式女声 |\n| `en-IN-NeerjaNeural` | 印度女声 |\n\n**日文**:\n| 声音 | 风格 |\n|------|------|\n| `ja-JP-NanamiNeural` | 日语女声 |\n| `ja-JP-MayuNeural` | 日语男声 |\n\n**韩文**:\n| 声音 | 风格 |\n|------|------|\n| `ko-KR-SunHiNeural` | 韩语女声 |\n| `ko-KR-InJoonNeural` | 韩语男声 |\n\n**其他常用**:\n| 声音 | 语言 |\n|------|------|\n| `fr-FR-DeniseNeural` | 法语女声 |\n| `de-DE-KatjaNeural` | 德语女声 |\n| `es-ES-ElviraNeural` | 西班牙语女声 |\n| `ru-RU-SvetlanaNeural` | 俄语女声 |\n| `pt-BR-FranciscaNeural` | 葡萄牙语女声 |\n\n> 💡 查看完整列表：`python3 scripts/tts_edge.py \"test\" --list-voices`\n\n---\n\n## 快速开始\n\n### 1. 安装依赖\n\n```bash\ncd ~/.openclaw/workspace/skills/tts-synthesizer\npip install -r requirements.txt\n```\n\n### 2. 运行（生成飞书语音用这个）\n\n```bash\n# ⭐ tts_simple.py — 输出 OGG/Opus，可直接作为飞书语音发送\npython3 scripts/tts_simple.py \"你好，这是测试语音\"\n\n# 使用指定声音（见下方声音列表）\npython3 scripts/tts_simple.py \"你好\" --voice zh-CN-YunxiNeural\n\n# 使用 API\npython3 scripts/tts_simple.py \"你好\" --engine api \\\n    --api-url https://api.openai.com/v1 \\\n    --api-key sk-xxx \\\n    --voice alloy\n```\n\n### 3. 调节语速和音调\n\n```bash\n# 语速 +10%（稍快）\npython3 scripts/tts_simple.py \"快速播报\" --rate \"+10%\"\n\n# 语速 -10%（稍慢）\npython3 scripts/tts_simple.py \"慢速播报\" --rate \"-10%\"\n\n# 音调升高\npython3 scripts/tts_simple.py \"音调较高\" --pitch \"+5Hz\"\n```\n\n---\n\n## 脚本说明\n\n### scripts/tts_simple.py ⭐ 推荐\n\n通用的文字转语音脚本，**自动输出 OGG/Opus 格式，适合飞书语音消息**。\n\n```bash\npython3 scripts/tts_simple.py \"要转换的文字\" [选项]\n```\n\n**参数**:\n\n| 参数 | 说明 |\n|------|------|\n| `text` | 要转换的文字，或 `.txt` 文件路径 |\n| `--output, -o` | 输出文件路径 |\n| `--engine, -e` | 引擎：`edge`（默认）或 `api` |\n| `--voice, -v` | 声音名称 |\n| `--rate, -r` | 语速，如 `+10%`、`-5%`（仅 edge） |\n| `--pitch, -p` | 音调，如 `+5Hz`、`-3Hz`（仅 edge） |\n| `--api-url` | API URL（api 模式） |\n| `--api-key` | API Key（api 模式） |\n| `--api-model` | API 模型（默认 `tts-1`） |\n\n### scripts/tts_edge.py\n\n纯粹的 edge-tts 脚本，**输出 MP3 格式**（不适合直接发送飞书语音）。\n\n```bash\n# 列出所有声音\npython3 scripts/tts_edge.py \"test\" --list-voices\n\n# 生成语音\npython3 scripts/tts_edge.py \"你好\" -o output.mp3 --voice zh-CN-Xiaoxiao\n```\n\n> 💡 发送飞书语音消息请用 `tts_simple.py`。\n\n---\n\n## 声音列表\n\nedge-tts 支持 100+ 声音，可通过以下命令查看：\n\n```bash\npython3 scripts/tts_edge.py \"test\" --list-voices\n```\n\n常用声音速查：\n\n| 语言 | 代码 | 声音 |\n|------|------|------|\n| 中文女声 | `zh-CN-Xiaoxiao` | 晓晓（默认）|\n| 中文男声 | `zh-CN-Yunxi` | 云希 |\n| 美式女声 | `en-US-Jenny` | Jenny |\n| 美式男声 | `en-US-Guy` | Guy |\n| 英式女声 | `en-GB-Sonia` | Sonia |\n| 日语女声 | `ja-JP-Nanami` | Nanami |\n\n---\n\n## 输出格式\n\n**重要**：飞书语音消息需要 **OGG/Opus** 格式，必须使用 `tts_simple.py`。\n\n| 脚本 | 输出格式 | 适用场景 |\n|------|----------|----------|\n| `tts_simple.py` ⭐ | OGG/Opus | **飞书语音消息**（直接发送） |\n| `tts_edge.py` | MP3 | 通用场景（需转换后才能发飞书语音） |\n\n> `tts_simple.py` 会自动将 edge-tts 输出的 webm 转换为 OGG/Opus，专门适配飞书语音消息。\n\n## 输出目录\n\n运行结果保存在工作区的 `projects/tts-synthesizer/` 目录下：\n\n```\n~/.openclaw/workspace/projects/tts-synthesizer/\n└── output/\n    └── tts_20260401_193000.ogg   # OGG/Opus 格式（飞书语音用这个）\n```\n\n---\n\n## 环境变量\n\n| 变量名 | 说明 |\n|--------|------|\n| `OPENCLAW_WORKSPACE` | 工作区根目录 |\n| `TTS_API_URL` | OpenAI 兼容 API URL |\n| `TTS_API_KEY` | API 密钥 |\n\n---\n\n## 故障排查\n\n### edge-tts 下载失败\n\n```bash\n# 检查网络\ncurl -I https://www.bing.com\n\n# edge-tts 需要访问微软服务\n# 如有代理干扰，清除环境变量\nunset all_proxy ALL_PROXY\n```\n\n### API 模式报错\n\n- 确认 API URL 正确（包含 `/v1`）\n- 确认 API Key 有效\n- 检查账户余额\n\n### 声音不自然\n\n- 中文推荐：`zh-CN-Xiaoxiao`（晓晓）\n- 调节语速 `--rate \"+10%\"` 或 `--rate \"-10%\"`\n- 调节音调 `--pitch \"+3Hz\"` 或 `--pitch \"-3Hz\"`\n\n---\n\n## 平台说明\n\n### edge-tts vs 其他 TTS 方案\n\n| 方案 | 成本 | 音质 | 中文支持 | 离线 | API Key |\n|------|------|------|---------|------|---------|\n| edge-tts | 免费 | 高 | 很好 | 否 | 不需要 |\n| OpenAI TTS | 按量计费 | 很高 | 一般 | 否 | 需要 |\n| pyttsx3 | 免费 | 低 | 一般 | 是 | 不需要 |\n\n### 已知限制\n\n- edge-tts 依赖微软服务，需要能访问 `edge.microsoft.com`\n- 部分声音在不同地区可能不可用\n\n## 目录结构\n\n### 技能目录（发布用）\n\n```\ntts-synthesizer/\n├── SKILL.md                    # 本文档\n├── _meta.json                  # 元数据\n├── .clawhub/                   # ClawHub 源信息\n├── requirements.txt            # Python 依赖\n└── scripts/\n    ├── tts_simple.py          # 通用 TTS 脚本（⭐ 推荐）\n    └── tts_edge.py            # edge-tts 专用脚本\n```\n\n### 项目目录（运行时数据）\n\n```\n~/.openclaw/workspace/projects/tts-synthesizer/\n├── output/                    # TTS 输出文件\n└── *.ogg                     # 历史语音文件\n```\n\n### 模型说明\n\n**edge-tts 无本地模型**，每次联网合成（微软服务器运行）。\n如需本地 GPU TTS（用你自己的显卡），需要额外安装 Coqui XTTS 等。\n\nFile v1.0.9:_meta.json\n\n{\n  \"ownerId\": \"kn75k53tcdhqwka2fra5x817p9821zpb\",\n  \"slug\": \"tts-synthesizer\",\n  \"version\": \"1.0.9\",\n  \"publishedAt\": 1777474370848\n}\n\nFile v1.0.9:skill-card.md\n\n## Description:\n\nConverts text to speech using Microsoft edge-tts or an OpenAI-compatible TTS API, with support for OGG/Opus output for Feishu voice messages.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[moroiser](https://clawhub.ai/user/moroiser)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nDevelopers and agent operators use this skill to synthesize spoken audio from text, choose TTS voices, and generate Feishu-ready OGG/Opus files or general MP3 output.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: TTS input text may be sent to Microsoft edge-tts or to the configured OpenAI-compatible API endpoint.\n\nMitigation: Avoid sending secrets or private regulated data for synthesis, and install the skill only when the configured provider is acceptable for the intended data.\n\nRisk: API mode sends credentials and requests to the configured TTS endpoint.\n\nMitigation: Use a trusted HTTPS API URL and prefer environment variables over command-line API keys.\n\nRisk: Dependency changes could affect runtime behavior or provider communication.\n\nMitigation: Pin dependencies in a virtual environment before use when reproducibility or change control matters.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/moroiser/skills/tts-synthesizer)\n- [Publisher profile](https://clawhub.ai/user/moroiser)\n- [OpenAI-compatible API base URL example](https://api.openai.com/v1)\n\n## Skill Output:\n\n**Output Type(s):** [Guidance, Shell commands, Configuration, Files]\n\n**Output Format:** [Markdown guidance with bash commands and generated audio file paths]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Produces OGG/Opus audio for Feishu voice messages through tts_simple.py and MP3 audio through tts_edge.py.]\n\n## Skill Version(s):\n\n1.0.9 (source: server release metadata)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.9:requirements.txt\n\n# Audio TTS Skill - Python Dependencies\n# Install: pip install -r requirements.txt\n#\n# ⚠️ System dependencies required (install separately):\n#   Ubuntu/Debian: sudo apt install ffmpeg libopus-tools\n#   macOS:         brew install ffmpeg\n#   Windows:       download ffmpeg and add to PATH\n\n# ── Core TTS ─────────────────────────────────────────────────────────────────\n# edge-tts: Microsoft Neural TTS (free, high quality, offline)\nedge-tts>=7.0.0\n\n# ── API Support ───────────────────────────────────────────────────────────────\n# For OpenAI-compatible API TTS\nopenai>=1.0.0\n\n# ── Audio Conversion ─────────────────────────────────────────────────────────\n# av (PyAV): audio/video conversion, required for OGG/Opus conversion\nav>=10.0.0\n\n# ── Core ─────────────────────────────────────────────────────────────────────\naiohttp>=3.8.0\n\nArchive v1.0.8: 5 files, 8310 bytes\n\nFiles: _meta.json (134b), requirements.txt (1362b), scripts/tts_edge.py (4520b), scripts/tts_simple.py (6941b), SKILL.md (7666b)\n\nFile v1.0.8:SKILL.md\n\n---\nname: TTS Synthesizer | TTS 合成器\ndescription: |\n  文字转语音（Text-to-Speech / TTS）工具。\n  支持 edge-tts（微软神经网络 TTS，在线合成）和 OpenAI 兼容 API TTS。\n  触发词：语音回复、TTS、文字转语音、语音合成、语音对话。\n  适用平台：Linux / Windows / macOS。\n---\n\n# TTS Synthesizer | TTS 合成器 🔊\n\n将文字转换为语音，支持微软神经网络 TTS（联网合成）和 OpenAI 兼容 API。\n\n## 目录\n\n1. [概述](#概述)\n2. [快速开始](#快速开始)\n3. [脚本说明](#脚本说明)\n4. [声音列表](#声音列表)\n5. [输出目录](#输出目录)\n6. [环境变量](#环境变量)\n7. [故障排查](#故障排查)\n\n---\n\n## 概述\n\n> ⚠️ **注意**：OpenClaw 内置了 `tts` 工具，但它的输出格式（MP3/WebM）不适合直接发送飞书语音。\n> **飞书语音消息必须用 `tts_simple.py`**，它会自动输出 OGG/Opus 格式。\n\n### 支持的 TTS 引擎\n\n| 引擎 | 说明 | 优点 | 缺点 |\n|------|------|------|------|\n| `edge` ⭐ | 微软神经网络 TTS | 免费、联网合成、高音质、支持中文 | 需访问微软服务 |\n| `api` | OpenAI 兼容 API | 质量高、可选声音多 | 需要 API Key |\n\n### edge-tts 支持的声音（完整列表）\n\n**中文（大陆）**:\n| 声音 | 风格 |\n|------|------|\n| `zh-CN-XiaoxiaoNeural` | 晓晓（女声，**默认**）|\n| `zh-CN-YunxiNeural` | 云希（男声）|\n| `zh-CN-YunyangNeural` | 云扬（男声）|\n| `zh-CN-XiaoyiNeural` | 晓伊（女声）|\n\n**中文（台湾）**:\n| 声音 | 风格 |\n|------|------|\n| `zh-TW-HsiaoYuNeural` | 小宇（女声）|\n\n**英文**:\n| 声音 | 风格 |\n|------|------|\n| `en-US-JennyNeural` | 美式女声 |\n| `en-US-GuyNeural` | 美式男声 |\n| `en-GB-SoniaNeural` | 英式女声 |\n| `en-GB-RyanNeural` | 英式男声 |\n| `en-AU-NatashaNeural` | 澳式女声 |\n| `en-IN-NeerjaNeural` | 印度女声 |\n\n**日文**:\n| 声音 | 风格 |\n|------|------|\n| `ja-JP-NanamiNeural` | 日语女声 |\n| `ja-JP-MayuNeural` | 日语男声 |\n\n**韩文**:\n| 声音 | 风格 |\n|------|------|\n| `ko-KR-SunHiNeural` | 韩语女声 |\n| `ko-KR-InJoonNeural` | 韩语男声 |\n\n**其他常用**:\n| 声音 | 语言 |\n|------|------|\n| `fr-FR-DeniseNeural` | 法语女声 |\n| `de-DE-KatjaNeural` | 德语女声 |\n| `es-ES-ElviraNeural` | 西班牙语女声 |\n| `ru-RU-SvetlanaNeural` | 俄语女声 |\n| `pt-BR-FranciscaNeural` | 葡萄牙语女声 |\n\n> 💡 查看完整列表：`python3 scripts/tts_edge.py \"test\" --list-voices`\n\n---\n\n## 快速开始\n\n### 1. 安装依赖\n\n```bash\ncd ~/.openclaw/workspace/skills/tts-synthesizer\npip install -r requirements.txt\n```\n\n### 2. 运行（生成飞书语音用这个）\n\n```bash\n# ⭐ tts_simple.py — 输出 OGG/Opus，可直接作为飞书语音发送\npython3 scripts/tts_simple.py \"你好，这是测试语音\"\n\n# 使用指定声音（见下方声音列表）\npython3 scripts/tts_simple.py \"你好\" --voice zh-CN-YunxiNeural\n\n# 使用 API\npython3 scripts/tts_simple.py \"你好\" --engine api \\\n    --api-url https://api.openai.com/v1 \\\n    --api-key sk-xxx \\\n    --voice alloy\n```\n\n### 3. 调节语速和音调\n\n```bash\n# 语速 +10%（稍快）\npython3 scripts/tts_simple.py \"快速播报\" --rate \"+10%\"\n\n# 语速 -10%（稍慢）\npython3 scripts/tts_simple.py \"慢速播报\" --rate \"-10%\"\n\n# 音调升高\npython3 scripts/tts_simple.py \"音调较高\" --pitch \"+5Hz\"\n```\n\n---\n\n## 脚本说明\n\n### scripts/tts_simple.py ⭐ 推荐\n\n通用的文字转语音脚本，**自动输出 OGG/Opus 格式，适合飞书语音消息**。\n\n```bash\npython3 scripts/tts_simple.py \"要转换的文字\" [选项]\n```\n\n**参数**:\n\n| 参数 | 说明 |\n|------|------|\n| `text` | 要转换的文字，或 `.txt` 文件路径 |\n| `--output, -o` | 输出文件路径 |\n| `--engine, -e` | 引擎：`edge`（默认）或 `api` |\n| `--voice, -v` | 声音名称 |\n| `--rate, -r` | 语速，如 `+10%`、`-5%`（仅 edge） |\n| `--pitch, -p` | 音调，如 `+5Hz`、`-3Hz`（仅 edge） |\n| `--api-url` | API URL（api 模式） |\n| `--api-key` | API Key（api 模式） |\n| `--api-model` | API 模型（默认 `tts-1`） |\n\n### scripts/tts_edge.py\n\n纯粹的 edge-tts 脚本，**输出 MP3 格式**（不适合直接发送飞书语音）。\n\n```bash\n# 列出所有声音\npython3 scripts/tts_edge.py \"test\" --list-voices\n\n# 生成语音\npython3 scripts/tts_edge.py \"你好\" -o output.mp3 --voice zh-CN-Xiaoxiao\n```\n\n> 💡 发送飞书语音消息请用 `tts_simple.py`。\n\n---\n\n## 声音列表\n\nedge-tts 支持 100+ 声音，可通过以下命令查看：\n\n```bash\npython3 scripts/tts_edge.py \"test\" --list-voices\n```\n\n常用声音速查：\n\n| 语言 | 代码 | 声音 |\n|------|------|------|\n| 中文女声 | `zh-CN-Xiaoxiao` | 晓晓（默认）|\n| 中文男声 | `zh-CN-Yunxi` | 云希 |\n| 美式女声 | `en-US-Jenny` | Jenny |\n| 美式男声 | `en-US-Guy` | Guy |\n| 英式女声 | `en-GB-Sonia` | Sonia |\n| 日语女声 | `ja-JP-Nanami` | Nanami |\n\n---\n\n## 输出格式\n\n**重要**：飞书语音消息需要 **OGG/Opus** 格式，必须使用 `tts_simple.py`。\n\n| 脚本 | 输出格式 | 适用场景 |\n|------|----------|----------|\n| `tts_simple.py` ⭐ | OGG/Opus | **飞书语音消息**（直接发送） |\n| `tts_edge.py` | MP3 | 通用场景（需转换后才能发飞书语音） |\n\n> `tts_simple.py` 会自动将 edge-tts 输出的 webm 转换为 OGG/Opus，专门适配飞书语音消息。\n\n## 输出目录\n\n运行结果保存在工作区的 `projects/tts-synthesizer/` 目录下：\n\n```\n~/.openclaw/workspace/projects/tts-synthesizer/\n└── output/\n    └── tts_20260401_193000.ogg   # OGG/Opus 格式（飞书语音用这个）\n```\n\n---\n\n## 环境变量\n\n| 变量名 | 说明 |\n|--------|------|\n| `OPENCLAW_WORKSPACE` | 工作区根目录 |\n| `TTS_API_URL` | OpenAI 兼容 API URL |\n| `TTS_API_KEY` | API 密钥 |\n\n---\n\n## 故障排查\n\n### edge-tts 下载失败\n\n```bash\n# 检查网络\ncurl -I https://www.bing.com\n\n# edge-tts 需要访问微软服务\n# 如有代理干扰，清除环境变量\nunset all_proxy ALL_PROXY\n```\n\n### API 模式报错\n\n- 确认 API URL 正确（包含 `/v1`）\n- 确认 API Key 有效\n- 检查账户余额\n\n### 声音不自然\n\n- 中文推荐：`zh-CN-Xiaoxiao`（晓晓）\n- 调节语速 `--rate \"+10%\"` 或 `--rate \"-10%\"`\n- 调节音调 `--pitch \"+3Hz\"` 或 `--pitch \"-3Hz\"`\n\n---\n\n## 平台说明\n\n### edge-tts vs 其他 TTS 方案\n\n| 方案 | 成本 | 音质 | 中文支持 | 离线 | API Key |\n|------|------|------|---------|------|---------|\n| edge-tts | 免费 | 高 | 很好 | 否 | 不需要 |\n| OpenAI TTS | 按量计费 | 很高 | 一般 | 否 | 需要 |\n| pyttsx3 | 免费 | 低 | 一般 | 是 | 不需要 |\n\n### 已知限制\n\n- edge-tts 依赖微软服务，需要能访问 `edge.microsoft.com`\n- 部分声音在不同地区可能不可用\n\n## 目录结构\n\n### 技能目录（发布用）\n\n```\ntts-synthesizer/\n├── SKILL.md                    # 本文档\n├── _meta.json                  # 元数据\n├── .clawhub/                   # ClawHub 源信息\n├── requirements.txt            # Python 依赖\n└── scripts/\n    ├── tts_simple.py          # 通用 TTS 脚本（⭐ 推荐）\n    └── tts_edge.py            # edge-tts 专用脚本\n```\n\n### 项目目录（运行时数据）\n\n```\n~/.openclaw/workspace/projects/tts-synthesizer/\n├── output/                    # TTS 输出文件\n└── *.ogg                     # 历史语音文件\n```\n\n### 模型说明\n\n**edge-tts 无本地模型**，每次联网合成（微软服务器运行）。\n如需本地 GPU TTS（用你自己的显卡），需要额外安装 Coqui XTTS 等。\n\nFile v1.0.8:_meta.json\n\n{\n  \"ownerId\": \"kn75k53tcdhqwka2fra5x817p9821zpb\",\n  \"slug\": \"tts-synthesizer\",\n  \"version\": \"1.0.8\",\n  \"publishedAt\": 1777471734737\n}\n\nFile v1.0.8:requirements.txt\n\n# Audio TTS Skill - Python Dependencies\n# Install: pip install -r requirements.txt\n#\n# ⚠️ System dependencies required (install separately):\n#   Ubuntu/Debian: sudo apt install ffmpeg libopus-tools\n#   macOS:         brew install ffmpeg\n#   Windows:       download ffmpeg and add to PATH\n\n# ── Core TTS ─────────────────────────────────────────────────────────────────\n# edge-tts: Microsoft Neural TTS (free, high quality, offline)\nedge-tts>=7.0.0\n\n# ── API Support ───────────────────────────────────────────────────────────────\n# For OpenAI-compatible API TTS\nopenai>=1.0.0\n\n# ── Audio Conversion ─────────────────────────────────────────────────────────\n# av (PyAV): audio/video conversion, required for OGG/Opus conversion\nav>=10.0.0\n\n# ── Core ─────────────────────────────────────────────────────────────────────\naiohttp>=3.8.0\n\nArchive v1.0.7: 5 files, 8319 bytes\n\nFiles: _meta.json (134b), requirements.txt (1362b), scripts/tts_edge.py (4523b), scripts/tts_simple.py (6944b), SKILL.md (7681b)\n\nFile v1.0.7:SKILL.md\n\n---\nname: TTS Synthesizer | TTS 合成器\ndescription: |\n  文字转语音（Text-to-Speech / TTS）工具。\n  支持 edge-tts（微软神经网络 TTS，在线合成）和 OpenAI 兼容 API TTS。\n  触发词：语音回复、TTS、文字转语音、语音合成、语音对话。\n  适用平台：Linux / Windows / macOS。\n---\n\n# TTS Synthesizer | TTS 合成器 🔊\n\n将文字转换为语音，支持微软神经网络 TTS（联网合成）和 OpenAI 兼容 API。\n\n## 目录\n\n1. [概述](#概述)\n2. [快速开始](#快速开始)\n3. [脚本说明](#脚本说明)\n4. [声音列表](#声音列表)\n5. [输出目录](#输出目录)\n6. [环境变量](#环境变量)\n7. [故障排查](#故障排查)\n\n---\n\n## 概述\n\n> ⚠️ **注意**：OpenClaw 内置了 `tts` 工具，但它的输出格式（MP3/WebM）不适合直接发送飞书语音。\n> **飞书语音消息必须用 `tts_simple.py`**，它会自动输出 OGG/Opus 格式。\n\n### 支持的 TTS 引擎\n\n| 引擎 | 说明 | 优点 | 缺点 |\n|------|------|------|------|\n| `edge` ⭐ | 微软神经网络 TTS | 免费、联网合成、高音质、支持中文 | 需访问微软服务 |\n| `api` | OpenAI 兼容 API | 质量高、可选声音多 | 需要 API Key |\n\n### edge-tts 支持的声音（完整列表）\n\n**中文（大陆）**:\n| 声音 | 风格 |\n|------|------|\n| `zh-CN-XiaoxiaoNeural` | 晓晓（女声，**默认**）|\n| `zh-CN-YunxiNeural` | 云希（男声）|\n| `zh-CN-YunyangNeural` | 云扬（男声）|\n| `zh-CN-XiaoyiNeural` | 晓伊（女声）|\n\n**中文（台湾）**:\n| 声音 | 风格 |\n|------|------|\n| `zh-TW-HsiaoYuNeural` | 小宇（女声）|\n\n**英文**:\n| 声音 | 风格 |\n|------|------|\n| `en-US-JennyNeural` | 美式女声 |\n| `en-US-GuyNeural` | 美式男声 |\n| `en-GB-SoniaNeural` | 英式女声 |\n| `en-GB-RyanNeural` | 英式男声 |\n| `en-AU-NatashaNeural` | 澳式女声 |\n| `en-IN-NeerjaNeural` | 印度女声 |\n\n**日文**:\n| 声音 | 风格 |\n|------|------|\n| `ja-JP-NanamiNeural` | 日语女声 |\n| `ja-JP-MayuNeural` | 日语男声 |\n\n**韩文**:\n| 声音 | 风格 |\n|------|------|\n| `ko-KR-SunHiNeural` | 韩语女声 |\n| `ko-KR-InJoonNeural` | 韩语男声 |\n\n**其他常用**:\n| 声音 | 语言 |\n|------|------|\n| `fr-FR-DeniseNeural` | 法语女声 |\n| `de-DE-KatjaNeural` | 德语女声 |\n| `es-ES-ElviraNeural` | 西班牙语女声 |\n| `ru-RU-SvetlanaNeural` | 俄语女声 |\n| `pt-BR-FranciscaNeural` | 葡萄牙语女声 |\n\n> 💡 查看完整列表：`python3 scripts/tts_edge.py \"test\" --list-voices`\n\n---\n\n## 快速开始\n\n### 1. 安装依赖\n\n```bash\ncd ~/.openclaw/workspace/skills/speech-synthesizer\npip install -r requirements.txt\n```\n\n### 2. 运行（生成飞书语音用这个）\n\n```bash\n# ⭐ tts_simple.py — 输出 OGG/Opus，可直接作为飞书语音发送\npython3 scripts/tts_simple.py \"你好，这是测试语音\"\n\n# 使用指定声音（见下方声音列表）\npython3 scripts/tts_simple.py \"你好\" --voice zh-CN-YunxiNeural\n\n# 使用 API\npython3 scripts/tts_simple.py \"你好\" --engine api \\\n    --api-url https://api.openai.com/v1 \\\n    --api-key sk-xxx \\\n    --voice alloy\n```\n\n### 3. 调节语速和音调\n\n```bash\n# 语速 +10%（稍快）\npython3 scripts/tts_simple.py \"快速播报\" --rate \"+10%\"\n\n# 语速 -10%（稍慢）\npython3 scripts/tts_simple.py \"慢速播报\" --rate \"-10%\"\n\n# 音调升高\npython3 scripts/tts_simple.py \"音调较高\" --pitch \"+5Hz\"\n```\n\n---\n\n## 脚本说明\n\n### scripts/tts_simple.py ⭐ 推荐\n\n通用的文字转语音脚本，**自动输出 OGG/Opus 格式，适合飞书语音消息**。\n\n```bash\npython3 scripts/tts_simple.py \"要转换的文字\" [选项]\n```\n\n**参数**:\n\n| 参数 | 说明 |\n|------|------|\n| `text` | 要转换的文字，或 `.txt` 文件路径 |\n| `--output, -o` | 输出文件路径 |\n| `--engine, -e` | 引擎：`edge`（默认）或 `api` |\n| `--voice, -v` | 声音名称 |\n| `--rate, -r` | 语速，如 `+10%`、`-5%`（仅 edge） |\n| `--pitch, -p` | 音调，如 `+5Hz`、`-3Hz`（仅 edge） |\n| `--api-url` | API URL（api 模式） |\n| `--api-key` | API Key（api 模式） |\n| `--api-model` | API 模型（默认 `tts-1`） |\n\n### scripts/tts_edge.py\n\n纯粹的 edge-tts 脚本，**输出 MP3 格式**（不适合直接发送飞书语音）。\n\n```bash\n# 列出所有声音\npython3 scripts/tts_edge.py \"test\" --list-voices\n\n# 生成语音\npython3 scripts/tts_edge.py \"你好\" -o output.mp3 --voice zh-CN-Xiaoxiao\n```\n\n> 💡 发送飞书语音消息请用 `tts_simple.py`。\n\n---\n\n## 声音列表\n\nedge-tts 支持 100+ 声音，可通过以下命令查看：\n\n```bash\npython3 scripts/tts_edge.py \"test\" --list-voices\n```\n\n常用声音速查：\n\n| 语言 | 代码 | 声音 |\n|------|------|------|\n| 中文女声 | `zh-CN-Xiaoxiao` | 晓晓（默认）|\n| 中文男声 | `zh-CN-Yunxi` | 云希 |\n| 美式女声 | `en-US-Jenny` | Jenny |\n| 美式男声 | `en-US-Guy` | Guy |\n| 英式女声 | `en-GB-Sonia` | Sonia |\n| 日语女声 | `ja-JP-Nanami` | Nanami |\n\n---\n\n## 输出格式\n\n**重要**：飞书语音消息需要 **OGG/Opus** 格式，必须使用 `tts_simple.py`。\n\n| 脚本 | 输出格式 | 适用场景 |\n|------|----------|----------|\n| `tts_simple.py` ⭐ | OGG/Opus | **飞书语音消息**（直接发送） |\n| `tts_edge.py` | MP3 | 通用场景（需转换后才能发飞书语音） |\n\n> `tts_simple.py` 会自动将 edge-tts 输出的 webm 转换为 OGG/Opus，专门适配飞书语音消息。\n\n## 输出目录\n\n运行结果保存在工作区的 `projects/speech-synthesizer/` 目录下：\n\n```\n~/.openclaw/workspace/projects/speech-synthesizer/\n└── output/\n    └── tts_20260401_193000.ogg   # OGG/Opus 格式（飞书语音用这个）\n```\n\n---\n\n## 环境变量\n\n| 变量名 | 说明 |\n|--------|------|\n| `OPENCLAW_WORKSPACE` | 工作区根目录 |\n| `TTS_API_URL` | OpenAI 兼容 API URL |\n| `TTS_API_KEY` | API 密钥 |\n\n---\n\n## 故障排查\n\n### edge-tts 下载失败\n\n```bash\n# 检查网络\ncurl -I https://www.bing.com\n\n# edge-tts 需要访问微软服务\n# 如有代理干扰，清除环境变量\nunset all_proxy ALL_PROXY\n```\n\n### API 模式报错\n\n- 确认 API URL 正确（包含 `/v1`）\n- 确认 API Key 有效\n- 检查账户余额\n\n### 声音不自然\n\n- 中文推荐：`zh-CN-Xiaoxiao`（晓晓）\n- 调节语速 `--rate \"+10%\"` 或 `--rate \"-10%\"`\n- 调节音调 `--pitch \"+3Hz\"` 或 `--pitch \"-3Hz\"`\n\n---\n\n## 平台说明\n\n### edge-tts vs 其他 TTS 方案\n\n| 方案 | 成本 | 音质 | 中文支持 | 离线 | API Key |\n|------|------|------|---------|------|---------|\n| edge-tts | 免费 | 高 | 很好 | 否 | 不需要 |\n| OpenAI TTS | 按量计费 | 很高 | 一般 | 否 | 需要 |\n| pyttsx3 | 免费 | 低 | 一般 | 是 | 不需要 |\n\n### 已知限制\n\n- edge-tts 依赖微软服务，需要能访问 `edge.microsoft.com`\n- 部分声音在不同地区可能不可用\n\n## 目录结构\n\n### 技能目录（发布用）\n\n```\nspeech-synthesizer/\n├── SKILL.md                    # 本文档\n├── _meta.json                  # 元数据\n├── .clawhub/                   # ClawHub 源信息\n├── requirements.txt            # Python 依赖\n└── scripts/\n    ├── tts_simple.py          # 通用 TTS 脚本（⭐ 推荐）\n    └── tts_edge.py            # edge-tts 专用脚本\n```\n\n### 项目目录（运行时数据）\n\n```\n~/.openclaw/workspace/projects/speech-synthesizer/\n├── output/                    # TTS 输出文件\n└── *.ogg                     # 历史语音文件\n```\n\n### 模型说明\n\n**edge-tts 无本地模型**，每次联网合成（微软服务器运行）。\n如需本地 GPU TTS（用你自己的显卡），需要额外安装 Coqui XTTS 等。\n\nFile v1.0.7:_meta.json\n\n{\n  \"ownerId\": \"kn75k53tcdhqwka2fra5x817p9821zpb\",\n  \"slug\": \"tts-synthesizer\",\n  \"version\": \"1.0.7\",\n  \"publishedAt\": 1777471279344\n}\n\nFile v1.0.7:requirements.txt\n\n# Audio TTS Skill - Python Dependencies\n# Install: pip install -r requirements.txt\n#\n# ⚠️ System dependencies required (install separately):\n#   Ubuntu/Debian: sudo apt install ffmpeg libopus-tools\n#   macOS:         brew install ffmpeg\n#   Windows:       download ffmpeg and add to PATH\n\n# ── Core TTS ─────────────────────────────────────────────────────────────────\n# edge-tts: Microsoft Neural TTS (free, high quality, offline)\nedge-tts>=7.0.0\n\n# ── API Support ───────────────────────────────────────────────────────────────\n# For OpenAI-compatible API TTS\nopenai>=1.0.0\n\n# ── Audio Conversion ─────────────────────────────────────────────────────────\n# av (PyAV): audio/video conversion, required for OGG/Opus conversion\nav>=10.0.0\n\n# ── Core ─────────────────────────────────────────────────────────────────────\naiohttp>=3.8.0\n\nArchive v1.0.6: 5 files, 8319 bytes\n\nFiles: _meta.json (134b), requirements.txt (1362b), scripts/tts_edge.py (4523b), scripts/tts_simple.py (6944b), SKILL.md (7667b)\n\nFile v1.0.6:SKILL.md\n\n---\nname: speech-synthesizer\ndescription: |\n  文字转语音（Text-to-Speech）工具。\n  支持 edge-tts（微软神经网络 TTS，在线合成）和 OpenAI 兼容 API TTS。\n  触发词：语音回复、TTS、文字转语音、语音合成、语音对话。\n  适用平台：Linux / Windows / macOS。\n---\n\n# Speech Synthesizer | 语音合成器 🔊\n\n将文字转换为语音，支持微软神经网络 TTS（联网合成）和 OpenAI 兼容 API。\n\n## 目录\n\n1. [概述](#概述)\n2. [快速开始](#快速开始)\n3. [脚本说明](#脚本说明)\n4. [声音列表](#声音列表)\n5. [输出目录](#输出目录)\n6. [环境变量](#环境变量)\n7. [故障排查](#故障排查)\n\n---\n\n## 概述\n\n> ⚠️ **注意**：OpenClaw 内置了 `tts` 工具，但它的输出格式（MP3/WebM）不适合直接发送飞书语音。\n> **飞书语音消息必须用 `tts_simple.py`**，它会自动输出 OGG/Opus 格式。\n\n### 支持的 TTS 引擎\n\n| 引擎 | 说明 | 优点 | 缺点 |\n|------|------|------|------|\n| `edge` ⭐ | 微软神经网络 TTS | 免费、联网合成、高音质、支持中文 | 需访问微软服务 |\n| `api` | OpenAI 兼容 API | 质量高、可选声音多 | 需要 API Key |\n\n### edge-tts 支持的声音（完整列表）\n\n**中文（大陆）**:\n| 声音 | 风格 |\n|------|------|\n| `zh-CN-XiaoxiaoNeural` | 晓晓（女声，**默认**）|\n| `zh-CN-YunxiNeural` | 云希（男声）|\n| `zh-CN-YunyangNeural` | 云扬（男声）|\n| `zh-CN-XiaoyiNeural` | 晓伊（女声）|\n\n**中文（台湾）**:\n| 声音 | 风格 |\n|------|------|\n| `zh-TW-HsiaoYuNeural` | 小宇（女声）|\n\n**英文**:\n| 声音 | 风格 |\n|------|------|\n| `en-US-JennyNeural` | 美式女声 |\n| `en-US-GuyNeural` | 美式男声 |\n| `en-GB-SoniaNeural` | 英式女声 |\n| `en-GB-RyanNeural` | 英式男声 |\n| `en-AU-NatashaNeural` | 澳式女声 |\n| `en-IN-NeerjaNeural` | 印度女声 |\n\n**日文**:\n| 声音 | 风格 |\n|------|------|\n| `ja-JP-NanamiNeural` | 日语女声 |\n| `ja-JP-MayuNeural` | 日语男声 |\n\n**韩文**:\n| 声音 | 风格 |\n|------|------|\n| `ko-KR-SunHiNeural` | 韩语女声 |\n| `ko-KR-InJoonNeural` | 韩语男声 |\n\n**其他常用**:\n| 声音 | 语言 |\n|------|------|\n| `fr-FR-DeniseNeural` | 法语女声 |\n| `de-DE-KatjaNeural` | 德语女声 |\n| `es-ES-ElviraNeural` | 西班牙语女声 |\n| `ru-RU-SvetlanaNeural` | 俄语女声 |\n| `pt-BR-FranciscaNeural` | 葡萄牙语女声 |\n\n> 💡 查看完整列表：`python3 scripts/tts_edge.py \"test\" --list-voices`\n\n---\n\n## 快速开始\n\n### 1. 安装依赖\n\n```bash\ncd ~/.openclaw/workspace/skills/speech-synthesizer\npip install -r requirements.txt\n```\n\n### 2. 运行（生成飞书语音用这个）\n\n```bash\n# ⭐ tts_simple.py — 输出 OGG/Opus，可直接作为飞书语音发送\npython3 scripts/tts_simple.py \"你好，这是测试语音\"\n\n# 使用指定声音（见下方声音列表）\npython3 scripts/tts_simple.py \"你好\" --voice zh-CN-YunxiNeural\n\n# 使用 API\npython3 scripts/tts_simple.py \"你好\" --engine api \\\n    --api-url https://api.openai.com/v1 \\\n    --api-key sk-xxx \\\n    --voice alloy\n```\n\n### 3. 调节语速和音调\n\n```bash\n# 语速 +10%（稍快）\npython3 scripts/tts_simple.py \"快速播报\" --rate \"+10%\"\n\n# 语速 -10%（稍慢）\npython3 scripts/tts_simple.py \"慢速播报\" --rate \"-10%\"\n\n# 音调升高\npython3 scripts/tts_simple.py \"音调较高\" --pitch \"+5Hz\"\n```\n\n---\n\n## 脚本说明\n\n### scripts/tts_simple.py ⭐ 推荐\n\n通用的文字转语音脚本，**自动输出 OGG/Opus 格式，适合飞书语音消息**。\n\n```bash\npython3 scripts/tts_simple.py \"要转换的文字\" [选项]\n```\n\n**参数**:\n\n| 参数 | 说明 |\n|------|------|\n| `text` | 要转换的文字，或 `.txt` 文件路径 |\n| `--output, -o` | 输出文件路径 |\n| `--engine, -e` | 引擎：`edge`（默认）或 `api` |\n| `--voice, -v` | 声音名称 |\n| `--rate, -r` | 语速，如 `+10%`、`-5%`（仅 edge） |\n| `--pitch, -p` | 音调，如 `+5Hz`、`-3Hz`（仅 edge） |\n| `--api-url` | API URL（api 模式） |\n| `--api-key` | API Key（api 模式） |\n| `--api-model` | API 模型（默认 `tts-1`） |\n\n### scripts/tts_edge.py\n\n纯粹的 edge-tts 脚本，**输出 MP3 格式**（不适合直接发送飞书语音）。\n\n```bash\n# 列出所有声音\npython3 scripts/tts_edge.py \"test\" --list-voices\n\n# 生成语音\npython3 scripts/tts_edge.py \"你好\" -o output.mp3 --voice zh-CN-Xiaoxiao\n```\n\n> 💡 发送飞书语音消息请用 `tts_simple.py`。\n\n---\n\n## 声音列表\n\nedge-tts 支持 100+ 声音，可通过以下命令查看：\n\n```bash\npython3 scripts/tts_edge.py \"test\" --list-voices\n```\n\n常用声音速查：\n\n| 语言 | 代码 | 声音 |\n|------|------|------|\n| 中文女声 | `zh-CN-Xiaoxiao` | 晓晓（默认）|\n| 中文男声 | `zh-CN-Yunxi` | 云希 |\n| 美式女声 | `en-US-Jenny` | Jenny |\n| 美式男声 | `en-US-Guy` | Guy |\n| 英式女声 | `en-GB-Sonia` | Sonia |\n| 日语女声 | `ja-JP-Nanami` | Nanami |\n\n---\n\n## 输出格式\n\n**重要**：飞书语音消息需要 **OGG/Opus** 格式，必须使用 `tts_simple.py`。\n\n| 脚本 | 输出格式 | 适用场景 |\n|------|----------|----------|\n| `tts_simple.py` ⭐ | OGG/Opus | **飞书语音消息**（直接发送） |\n| `tts_edge.py` | MP3 | 通用场景（需转换后才能发飞书语音） |\n\n> `tts_simple.py` 会自动将 edge-tts 输出的 webm 转换为 OGG/Opus，专门适配飞书语音消息。\n\n## 输出目录\n\n运行结果保存在工作区的 `projects/speech-synthesizer/` 目录下：\n\n```\n~/.openclaw/workspace/projects/speech-synthesizer/\n└── output/\n    └── tts_20260401_193000.ogg   # OGG/Opus 格式（飞书语音用这个）\n```\n\n---\n\n## 环境变量\n\n| 变量名 | 说明 |\n|--------|------|\n| `OPENCLAW_WORKSPACE` | 工作区根目录 |\n| `TTS_API_URL` | OpenAI 兼容 API URL |\n| `TTS_API_KEY` | API 密钥 |\n\n---\n\n## 故障排查\n\n### edge-tts 下载失败\n\n```bash\n# 检查网络\ncurl -I https://www.bing.com\n\n# edge-tts 需要访问微软服务\n# 如有代理干扰，清除环境变量\nunset all_proxy ALL_PROXY\n```\n\n### API 模式报错\n\n- 确认 API URL 正确（包含 `/v1`）\n- 确认 API Key 有效\n- 检查账户余额\n\n### 声音不自然\n\n- 中文推荐：`zh-CN-Xiaoxiao`（晓晓）\n- 调节语速 `--rate \"+10%\"` 或 `--rate \"-10%\"`\n- 调节音调 `--pitch \"+3Hz\"` 或 `--pitch \"-3Hz\"`\n\n---\n\n## 平台说明\n\n### edge-tts vs 其他 TTS 方案\n\n| 方案 | 成本 | 音质 | 中文支持 | 离线 | API Key |\n|------|------|------|---------|------|---------|\n| edge-tts | 免费 | 高 | 很好 | 否 | 不需要 |\n| OpenAI TTS | 按量计费 | 很高 | 一般 | 否 | 需要 |\n| pyttsx3 | 免费 | 低 | 一般 | 是 | 不需要 |\n\n### 已知限制\n\n- edge-tts 依赖微软服务，需要能访问 `edge.microsoft.com`\n- 部分声音在不同地区可能不可用\n\n## 目录结构\n\n### 技能目录（发布用）\n\n```\nspeech-synthesizer/\n├── SKILL.md                    # 本文档\n├── _meta.json                  # 元数据\n├── .clawhub/                   # ClawHub 源信息\n├── requirements.txt            # Python 依赖\n└── scripts/\n    ├── tts_simple.py          # 通用 TTS 脚本（⭐ 推荐）\n    └── tts_edge.py            # edge-tts 专用脚本\n```\n\n### 项目目录（运行时数据）\n\n```\n~/.openclaw/workspace/projects/speech-synthesizer/\n├── output/                    # TTS 输出文件\n└── *.ogg                     # 历史语音文件\n```\n\n### 模型说明\n\n**edge-tts 无本地模型**，每次联网合成（微软服务器运行）。\n如需本地 GPU TTS（用你自己的显卡），需要额外安装 Coqui XTTS 等。\n\nFile v1.0.6:_meta.json\n\n{\n  \"ownerId\": \"kn75k53tcdhqwka2fra5x817p9821zpb\",\n  \"slug\": \"tts-synthesizer\",\n  \"version\": \"1.0.6\",\n  \"publishedAt\": 1775987806781\n}\n\nFile v1.0.6:requirements.txt\n\n# Audio TTS Skill - Python Dependencies\n# Install: pip install -r requirements.txt\n#\n# ⚠️ System dependencies required (install separately):\n#   Ubuntu/Debian: sudo apt install ffmpeg libopus-tools\n#   macOS:         brew install ffmpeg\n#   Windows:       download ffmpeg and add to PATH\n\n# ── Core TTS ─────────────────────────────────────────────────────────────────\n# edge-tts: Microsoft Neural TTS (free, high quality, offline)\nedge-tts>=7.0.0\n\n# ── API Support ───────────────────────────────────────────────────────────────\n# For OpenAI-compatible API TTS\nopenai>=1.0.0\n\n# ── Audio Conversion ─────────────────────────────────────────────────────────\n# av (PyAV): audio/video conversion, required for OGG/Opus conversion\nav>=10.0.0\n\n# ── Core ─────────────────────────────────────────────────────────────────────\naiohttp>=3.8.0\n\nArchive v1.0.5: 5 files, 8449 bytes\n\nFiles: _meta.json (134b), requirements.txt (1362b), scripts/tts_edge.py (4523b), scripts/tts_simple.py (6944b), SKILL.md (7919b)\n\nFile v1.0.5:SKILL.md\n\n---\nname: speech-synthesizer\ndescription: |\n  文字转语音（Text-to-Speech）工具。\n  支持 edge-tts（微软神经网络 TTS，免费离线）和 OpenAI 兼容 API TTS。\n  触发词：语音回复、TTS、文字转语音、语音合成、语音对话。\n  适用平台：Linux / Windows / macOS。\n---\n\n# Speech Synthesizer | 语音合成器 🔊\n\n将文字转换为语音，支持微软神经网络 TTS（免费离线）和 OpenAI 兼容 API。\n\n---\n\n## 更新日志\n\n### v1.0.5\n- 修复：脚本输出路径从 `tts/` 改为 `speech-synthesizer/`，与文档一致\n\n### v1.0.4\n- 优化：目录结构统一，使用技能同名规范\n- 完善：SKILL.md 结构优化，补充常见声音列表\n\n---\n\n## 目录\n\n1. [概述](#概述)\n2. [快速开始](#快速开始)\n3. [脚本说明](#脚本说明)\n4. [声音列表](#声音列表)\n5. [输出目录](#输出目录)\n6. [环境变量](#环境变量)\n7. [故障排查](#故障排查)\n\n---\n\n## 概述\n\n> ⚠️ **注意**：OpenClaw 内置了 `tts` 工具，但它的输出格式（MP3/WebM）不适合直接发送飞书语音。\n> **飞书语音消息必须用 `tts_simple.py`**，它会自动输出 OGG/Opus 格式。\n\n### 支持的 TTS 引擎\n\n| 引擎 | 说明 | 优点 | 缺点 |\n|------|------|------|------|\n| `edge` ⭐ | 微软神经网络 TTS | 免费、离线、高音质、支持中文 | 需网络下载初期 |\n| `api` | OpenAI 兼容 API | 质量高、可选声音多 | 需要 API Key |\n\n### edge-tts 支持的声音（完整列表）\n\n**中文（大陆）**:\n| 声音 | 风格 |\n|------|------|\n| `zh-CN-XiaoxiaoNeural` | 晓晓（女声，**默认**）|\n| `zh-CN-YunxiNeural` | 云希（男声）|\n| `zh-CN-YunyangNeural` | 云扬（男声）|\n| `zh-CN-XiaoyiNeural` | 晓伊（女声）|\n\n**中文（台湾）**:\n| 声音 | 风格 |\n|------|------|\n| `zh-TW-HsiaoYuNeural` | 小宇（女声）|\n\n**英文**:\n| 声音 | 风格 |\n|------|------|\n| `en-US-JennyNeural` | 美式女声 |\n| `en-US-GuyNeural` | 美式男声 |\n| `en-GB-SoniaNeural` | 英式女声 |\n| `en-GB-RyanNeural` | 英式男声 |\n| `en-AU-NatashaNeural` | 澳式女声 |\n| `en-IN-NeerjaNeural` | 印度女声 |\n\n**日文**:\n| 声音 | 风格 |\n|------|------|\n| `ja-JP-NanamiNeural` | 日语女声 |\n| `ja-JP-MayuNeural` | 日语男声 |\n\n**韩文**:\n| 声音 | 风格 |\n|------|------|\n| `ko-KR-SunHiNeural` | 韩语女声 |\n| `ko-KR-InJoonNeural` | 韩语男声 |\n\n**其他常用**:\n| 声音 | 语言 |\n|------|------|\n| `fr-FR-DeniseNeural` | 法语女声 |\n| `de-DE-KatjaNeural` | 德语女声 |\n| `es-ES-ElviraNeural` | 西班牙语女声 |\n| `ru-RU-SvetlanaNeural` | 俄语女声 |\n| `pt-BR-FranciscaNeural` | 葡萄牙语女声 |\n\n> 💡 查看完整列表：`python3 scripts/tts_edge.py \"test\" --list-voices`\n\n---\n\n## 快速开始\n\n### 1. 安装依赖\n\n```bash\ncd ~/.openclaw/workspace/skills/speech-synthesizer\npip install -r requirements.txt\n```\n\n### 2. 运行（生成飞书语音用这个）\n\n```bash\n# ⭐ tts_simple.py — 输出 OGG/Opus，可直接作为飞书语音发送\npython3 scripts/tts_simple.py \"你好，这是测试语音\"\n\n# 使用指定声音（见下方声音列表）\npython3 scripts/tts_simple.py \"你好\" --voice zh-CN-YunxiNeural\n\n# 使用 API\npython3 scripts/tts_simple.py \"你好\" --engine api \\\n    --api-url https://api.openai.com/v1 \\\n    --api-key sk-xxx \\\n    --voice alloy\n```\n\n### 3. 调节语速和音调\n\n```bash\n# 语速 +10%（稍快）\npython3 scripts/tts_simple.py \"快速播报\" --rate \"+10%\"\n\n# 语速 -10%（稍慢）\npython3 scripts/tts_simple.py \"慢速播报\" --rate \"-10%\"\n\n# 音调升高\npython3 scripts/tts_simple.py \"音调较高\" --pitch \"+5Hz\"\n```\n\n---\n\n## 脚本说明\n\n### scripts/tts_simple.py ⭐ 推荐\n\n通用的文字转语音脚本，**自动输出 OGG/Opus 格式，适合飞书语音消息**。\n\n```bash\npython3 scripts/tts_simple.py \"要转换的文字\" [选项]\n```\n\n**参数**:\n\n| 参数 | 说明 |\n|------|------|\n| `text` | 要转换的文字，或 `.txt` 文件路径 |\n| `--output, -o` | 输出文件路径 |\n| `--engine, -e` | 引擎：`edge`（默认）或 `api` |\n| `--voice, -v` | 声音名称 |\n| `--rate, -r` | 语速，如 `+10%`、`-5%`（仅 edge） |\n| `--pitch, -p` | 音调，如 `+5Hz`、`-3Hz`（仅 edge） |\n| `--api-url` | API URL（api 模式） |\n| `--api-key` | API Key（api 模式） |\n| `--api-model` | API 模型（默认 `tts-1`） |\n\n### scripts/tts_edge.py\n\n纯粹的 edge-tts 脚本，**输出 MP3 格式**（不适合直接发送飞书语音）。\n\n```bash\n# 列出所有声音\npython3 scripts/tts_edge.py \"test\" --list-voices\n\n# 生成语音\npython3 scripts/tts_edge.py \"你好\" -o output.mp3 --voice zh-CN-Xiaoxiao\n```\n\n> 💡 发送飞书语音消息请用 `tts_simple.py`。\n\n---\n\n## 声音列表\n\nedge-tts 支持 100+ 声音，可通过以下命令查看：\n\n```bash\npython3 scripts/tts_edge.py \"test\" --list-voices\n```\n\n常用声音速查：\n\n| 语言 | 代码 | 声音 |\n|------|------|------|\n| 中文女声 | `zh-CN-Xiaoxiao` | 晓晓（默认）|\n| 中文男声 | `zh-CN-Yunxi` | 云希 |\n| 美式女声 | `en-US-Jenny` | Jenny |\n| 美式男声 | `en-US-Guy` | Guy |\n| 英式女声 | `en-GB-Sonia` | Sonia |\n| 日语女声 | `ja-JP-Nanami` | Nanami |\n\n---\n\n## 输出格式\n\n**重要**：飞书语音消息需要 **OGG/Opus** 格式，必须使用 `tts_simple.py`。\n\n| 脚本 | 输出格式 | 适用场景 |\n|------|----------|----------|\n| `tts_simple.py` ⭐ | OGG/Opus | **飞书语音消息**（直接发送） |\n| `tts_edge.py` | MP3 | 通用场景（需转换后才能发飞书语音） |\n\n> `tts_simple.py` 会自动将 edge-tts 输出的 webm 转换为 OGG/Opus，专门适配飞书语音消息。\n\n## 输出目录\n\n运行结果保存在工作区的 `projects/speech-synthesizer/` 目录下：\n\n```\n~/.openclaw/workspace/projects/speech-synthesizer/\n└── output/\n    └── tts_20260401_193000.ogg   # OGG/Opus 格式（飞书语音用这个）\n```\n\n---\n\n## 环境变量\n\n| 变量名 | 说明 |\n|--------|------|\n| `OPENCLAW_WORKSPACE` | 工作区根目录 |\n| `TTS_API_URL` | OpenAI 兼容 API URL |\n| `TTS_API_KEY` | API 密钥 |\n\n---\n\n## 故障排查\n\n### edge-tts 下载失败\n\n```bash\n# 检查网络\ncurl -I https://www.bing.com\n\n# edge-tts 需要访问微软服务\n# 如有代理干扰，清除环境变量\nunset all_proxy ALL_PROXY\n```\n\n### API 模式报错\n\n- 确认 API URL 正确（包含 `/v1`）\n- 确认 API Key 有效\n- 检查账户余额\n\n### 声音不自然\n\n- 中文推荐：`zh-CN-Xiaoxiao`（晓晓）\n- 调节语速 `--rate \"+10%\"` 或 `--rate \"-10%\"`\n- 调节音调 `--pitch \"+3Hz\"` 或 `--pitch \"-3Hz\"`\n\n---\n\n## 平台说明\n\n### edge-tts vs 其他 TTS 方案\n\n| 方案 | 成本 | 音质 | 中文支持 | 离线 | API Key |\n|------|------|------|---------|------|---------|\n| edge-tts | 免费 | 高 | 很好 | 部分 | 不需要 |\n| OpenAI TTS | 按量计费 | 很高 | 一般 | 否 | 需要 |\n| pyttsx3 | 免费 | 低 | 一般 | 是 | 不需要 |\n\n### 已知限制\n\n- edge-tts 依赖微软服务，需要能访问 `edge.microsoft.com`\n- 部分声音在不同地区可能不可用\n\n## 目录结构\n\n### 技能目录（发布用）\n\n```\nspeech-synthesizer/\n├── SKILL.md                    # 本文档\n├── _meta.json                  # 元数据\n├── .clawhub/                   # ClawHub 源信息\n├── requirements.txt            # Python 依赖\n└── scripts/\n    ├── tts_simple.py          # 通用 TTS 脚本（⭐ 推荐）\n    └── tts_edge.py            # edge-tts 专用脚本\n```\n\n### 项目目录（运行时数据）\n\n```\n~/.openclaw/workspace/projects/speech-synthesizer/\n├── output/                    # TTS 输出文件\n└── *.ogg                     # 历史语音文件\n```\n\n### 模型说明\n\n**edge-tts 无本地模型**，每次联网合成（微软服务器运行）。\n如需本地 GPU TTS（用你自己的显卡），需要额外安装 Coqui XTTS 等。\n\nFile v1.0.5:_meta.json\n\n{\n  \"ownerId\": \"kn75k53tcdhqwka2fra5x817p9821zpb\",\n  \"slug\": \"tts-synthesizer\",\n  \"version\": \"1.0.5\",\n  \"publishedAt\": 1775986509995\n}\n\nFile v1.0.5:requirements.txt\n\n# Audio TTS Skill - Python Dependencies\n# Install: pip install -r requirements.txt\n#\n# ⚠️ System dependencies required (install separately):\n#   Ubuntu/Debian: sudo apt install ffmpeg libopus-tools\n#   macOS:         brew install ffmpeg\n#   Windows:       download ffmpeg and add to PATH\n\n# ── Core TTS ─────────────────────────────────────────────────────────────────\n# edge-tts: Microsoft Neural TTS (free, high quality, offline)\nedge-tts>=7.0.0\n\n# ── API Support ───────────────────────────────────────────────────────────────\n# For OpenAI-compatible API TTS\nopenai>=1.0.0\n\n# ── Audio Conversion ─────────────────────────────────────────────────────────\n# av (PyAV): audio/video conversion, required for OGG/Opus conversion\nav>=10.0.0\n\n# ── Core ─────────────────────────────────────────────────────────────────────\naiohttp>=3.8.0\n\nArchive v1.0.4: 5 files, 8303 bytes\n\nFiles: _meta.json (134b), requirements.txt (1362b), scripts/tts_edge.py (4508b), scripts/tts_simple.py (6929b), SKILL.md (7669b)\n\nFile v1.0.4:SKILL.md\n\n---\nname: speech-synthesizer\ndescription: |\n  文字转语音（Text-to-Speech）工具。\n  支持 edge-tts（微软神经网络 TTS，免费离线）和 OpenAI 兼容 API TTS。\n  触发词：语音回复、TTS、文字转语音、语音合成、语音对话。\n  适用平台：Linux / Windows / macOS。\n---\n\n# Speech Synthesizer | 语音合成器 🔊\n\n将文字转换为语音，支持微软神经网络 TTS（免费离线）和 OpenAI 兼容 API。\n\n---\n\n## 目录\n\n1. [概述](#概述)\n2. [快速开始](#快速开始)\n3. [脚本说明](#脚本说明)\n4. [声音列表](#声音列表)\n5. [输出目录](#输出目录)\n6. [环境变量](#环境变量)\n7. [故障排查](#故障排查)\n\n---\n\n## 概述\n\n> ⚠️ **注意**：OpenClaw 内置了 `tts` 工具，但它的输出格式（MP3/WebM）不适合直接发送飞书语音。\n> **飞书语音消息必须用 `tts_simple.py`**，它会自动输出 OGG/Opus 格式。\n\n### 支持的 TTS 引擎\n\n| 引擎 | 说明 | 优点 | 缺点 |\n|------|------|------|------|\n| `edge` ⭐ | 微软神经网络 TTS | 免费、离线、高音质、支持中文 | 需网络下载初期 |\n| `api` | OpenAI 兼容 API | 质量高、可选声音多 | 需要 API Key |\n\n### edge-tts 支持的声音（完整列表）\n\n**中文（大陆）**:\n| 声音 | 风格 |\n|------|------|\n| `zh-CN-XiaoxiaoNeural` | 晓晓（女声，**默认**）|\n| `zh-CN-YunxiNeural` | 云希（男声）|\n| `zh-CN-YunyangNeural` | 云扬（男声）|\n| `zh-CN-XiaoyiNeural` | 晓伊（女声）|\n\n**中文（台湾）**:\n| 声音 | 风格 |\n|------|------|\n| `zh-TW-HsiaoYuNeural` | 小宇（女声）|\n\n**英文**:\n| 声音 | 风格 |\n|------|------|\n| `en-US-JennyNeural` | 美式女声 |\n| `en-US-GuyNeural` | 美式男声 |\n| `en-GB-SoniaNeural` | 英式女声 |\n| `en-GB-RyanNeural` | 英式男声 |\n| `en-AU-NatashaNeural` | 澳式女声 |\n| `en-IN-NeerjaNeural` | 印度女声 |\n\n**日文**:\n| 声音 | 风格 |\n|------|------|\n| `ja-JP-NanamiNeural` | 日语女声 |\n| `ja-JP-MayuNeural` | 日语男声 |\n\n**韩文**:\n| 声音 | 风格 |\n|------|------|\n| `ko-KR-SunHiNeural` | 韩语女声 |\n| `ko-KR-InJoonNeural` | 韩语男声 |\n\n**其他常用**:\n| 声音 | 语言 |\n|------|------|\n| `fr-FR-DeniseNeural` | 法语女声 |\n| `de-DE-KatjaNeural` | 德语女声 |\n| `es-ES-ElviraNeural` | 西班牙语女声 |\n| `ru-RU-SvetlanaNeural` | 俄语女声 |\n| `pt-BR-FranciscaNeural` | 葡萄牙语女声 |\n\n> 💡 查看完整列表：`python3 scripts/tts_edge.py \"test\" --list-voices`\n\n---\n\n## 快速开始\n\n### 1. 安装依赖\n\n```bash\ncd ~/.openclaw/workspace/skills/speech-synthesizer\npip install -r requirements.txt\n```\n\n### 2. 运行（生成飞书语音用这个）\n\n```bash\n# ⭐ tts_simple.py — 输出 OGG/Opus，可直接作为飞书语音发送\npython3 scripts/tts_simple.py \"你好，这是测试语音\"\n\n# 使用指定声音（见下方声音列表）\npython3 scripts/tts_simple.py \"你好\" --voice zh-CN-YunxiNeural\n\n# 使用 API\npython3 scripts/tts_simple.py \"你好\" --engine api \\\n    --api-url https://api.openai.com/v1 \\\n    --api-key sk-xxx \\\n    --voice alloy\n```\n\n### 3. 调节语速和音调\n\n```bash\n# 语速 +10%（稍快）\npython3 scripts/tts_simple.py \"快速播报\" --rate \"+10%\"\n\n# 语速 -10%（稍慢）\npython3 scripts/tts_simple.py \"慢速播报\" --rate \"-10%\"\n\n# 音调升高\npython3 scripts/tts_simple.py \"音调较高\" --pitch \"+5Hz\"\n```\n\n---\n\n## 脚本说明\n\n### scripts/tts_simple.py ⭐ 推荐\n\n通用的文字转语音脚本，**自动输出 OGG/Opus 格式，适合飞书语音消息**。\n\n```bash\npython3 scripts/tts_simple.py \"要转换的文字\" [选项]\n```\n\n**参数**:\n\n| 参数 | 说明 |\n|------|------|\n| `text` | 要转换的文字，或 `.txt` 文件路径 |\n| `--output, -o` | 输出文件路径 |\n| `--engine, -e` | 引擎：`edge`（默认）或 `api` |\n| `--voice, -v` | 声音名称 |\n| `--rate, -r` | 语速，如 `+10%`、`-5%`（仅 edge） |\n| `--pitch, -p` | 音调，如 `+5Hz`、`-3Hz`（仅 edge） |\n| `--api-url` | API URL（api 模式） |\n| `--api-key` | API Key（api 模式） |\n| `--api-model` | API 模型（默认 `tts-1`） |\n\n### scripts/tts_edge.py\n\n纯粹的 edge-tts 脚本，**输出 MP3 格式**（不适合直接发送飞书语音）。\n\n```bash\n# 列出所有声音\npython3 scripts/tts_edge.py \"test\" --list-voices\n\n# 生成语音\npython3 scripts/tts_edge.py \"你好\" -o output.mp3 --voice zh-CN-Xiaoxiao\n```\n\n> 💡 发送飞书语音消息请用 `tts_simple.py`。\n\n---\n\n## 声音列表\n\nedge-tts 支持 100+ 声音，可通过以下命令查看：\n\n```bash\npython3 scripts/tts_edge.py \"test\" --list-voices\n```\n\n常用声音速查：\n\n| 语言 | 代码 | 声音 |\n|------|------|------|\n| 中文女声 | `zh-CN-Xiaoxiao` | 晓晓（默认）|\n| 中文男声 | `zh-CN-Yunxi` | 云希 |\n| 美式女声 | `en-US-Jenny` | Jenny |\n| 美式男声 | `en-US-Guy` | Guy |\n| 英式女声 | `en-GB-Sonia` | Sonia |\n| 日语女声 | `ja-JP-Nanami` | Nanami |\n\n---\n\n## 输出格式\n\n**重要**：飞书语音消息需要 **OGG/Opus** 格式，必须使用 `tts_simple.py`。\n\n| 脚本 | 输出格式 | 适用场景 |\n|------|----------|----------|\n| `tts_simple.py` ⭐ | OGG/Opus | **飞书语音消息**（直接发送） |\n| `tts_edge.py` | MP3 | 通用场景（需转换后才能发飞书语音） |\n\n> `tts_simple.py` 会自动将 edge-tts 输出的 webm 转换为 OGG/Opus，专门适配飞书语音消息。\n\n## 输出目录\n\n运行结果保存在工作区的 `projects/speech-synthesizer/` 目录下：\n\n```\n~/.openclaw/workspace/projects/speech-synthesizer/\n└── output/\n    └── tts_20260401_193000.ogg   # OGG/Opus 格式（飞书语音用这个）\n```\n\n---\n\n## 环境变量\n\n| 变量名 | 说明 |\n|--------|------|\n| `OPENCLAW_WORKSPACE` | 工作区根目录 |\n| `TTS_API_URL` | OpenAI 兼容 API URL |\n| `TTS_API_KEY` | API 密钥 |\n\n---\n\n## 故障排查\n\n### edge-tts 下载失败\n\n```bash\n# 检查网络\ncurl -I https://www.bing.com\n\n# edge-tts 需要访问微软服务\n# 如有代理干扰，清除环境变量\nunset all_proxy ALL_PROXY\n```\n\n### API 模式报错\n\n- 确认 API URL 正确（包含 `/v1`）\n- 确认 API Key 有效\n- 检查账户余额\n\n### 声音不自然\n\n- 中文推荐：`zh-CN-Xiaoxiao`（晓晓）\n- 调节语速 `--rate \"+10%\"` 或 `--rate \"-10%\"`\n- 调节音调 `--pitch \"+3Hz\"` 或 `--pitch \"-3Hz\"`\n\n---\n\n## 平台说明\n\n### edge-tts vs 其他 TTS 方案\n\n| 方案 | 成本 | 音质 | 中文支持 | 离线 | API Key |\n|------|------|------|---------|------|---------|\n| edge-tts | 免费 | 高 | 很好 | 部分 | 不需要 |\n| OpenAI TTS | 按量计费 | 很高 | 一般 | 否 | 需要 |\n| pyttsx3 | 免费 | 低 | 一般 | 是 | 不需要 |\n\n### 已知限制\n\n- edge-tts 依赖微软服务，需要能访问 `edge.microsoft.com`\n- 部分声音在不同地区可能不可用\n\n## 目录结构\n\n### 技能目录（发布用）\n\n```\nspeech-synthesizer/\n├── SKILL.md                    # 本文档\n├── _meta.json                  # 元数据\n├── .clawhub/                   # ClawHub 源信息\n├── requirements.txt            # Python 依赖\n└── scripts/\n    ├── tts_simple.py          # 通用 TTS 脚本（⭐ 推荐）\n    └── tts_edge.py            # edge-tts 专用脚本\n```\n\n### 项目目录（运行时数据）\n\n```\n~/.openclaw/workspace/projects/speech-synthesizer/\n├── output/                    # TTS 输出文件\n└── *.ogg                     # 历史语音文件\n```\n\n### 模型说明\n\n**edge-tts 无本地模型**，每次联网合成（微软服务器运行）。\n如需本地 GPU TTS（用你自己的显卡），需要额外安装 Coqui XTTS 等。\n\nFile v1.0.4:_meta.json\n\n{\n  \"ownerId\": \"kn75k53tcdhqwka2fra5x817p9821zpb\",\n  \"slug\": \"tts-synthesizer\",\n  \"version\": \"1.0.4\",\n  \"publishedAt\": 1775985902794\n}\n\nFile v1.0.4:requirements.txt\n\n# Audio TTS Skill - Python Dependencies\n# Install: pip install -r requirements.txt\n#\n# ⚠️ System dependencies required (install separately):\n#   Ubuntu/Debian: sudo apt install ffmpeg libopus-tools\n#   macOS:         brew install ffmpeg\n#   Windows:       download ffmpeg and add to PATH\n\n# ── Core TTS ─────────────────────────────────────────────────────────────────\n# edge-tts: Microsoft Neural TTS (free, high quality, offline)\nedge-tts>=7.0.0\n\n# ── API Support ───────────────────────────────────────────────────────────────\n# For OpenAI-compatible API TTS\nopenai>=1.0.0\n\n# ── Audio Conversion ─────────────────────────────────────────────────────────\n# av (PyAV): audio/video conversion, required for OGG/Opus conversion\nav>=10.0.0\n\n# ── Core ─────────────────────────────────────────────────────────────────────\naiohttp>=3.8.0\n\nArchive v1.0.3: 5 files, 8122 bytes\n\nFiles: _meta.json (134b), requirements.txt (1362b), scripts/tts_edge.py (4508b), scripts/tts_simple.py (6929b), SKILL.md (7180b)\n\nFile v1.0.3:SKILL.md\n\n---\nname: speech-synthesizer\ndescription: |\n  文字转语音（Text-to-Speech）工具。\n  支持 edge-tts（微软神经网络 TTS，免费离线）和 OpenAI 兼容 API TTS。\n  触发词：语音回复、TTS、文字转语音、语音合成、语音对话。\n  适用平台：Linux / Windows / macOS。\n---\n\n# Speech Synthesizer | 语音合成器 🔊\n\n将文字转换为语音，支持微软神经网络 TTS（免费离线）和 OpenAI 兼容 API。\n\n---\n\n## 目录\n\n1. [概述](#概述)\n2. [快速开始](#快速开始)\n3. [脚本说明](#脚本说明)\n4. [声音列表](#声音列表)\n5. [输出目录](#输出目录)\n6. [环境变量](#环境变量)\n7. [故障排查](#故障排查)\n\n---\n\n## 概述\n\n> ⚠️ **注意**：OpenClaw 内置了 `tts` 工具，但它的输出格式（MP3/WebM）不适合直接发送飞书语音。\n> **飞书语音消息必须用 `tts_simple.py`**，它会自动输出 OGG/Opus 格式。\n\n### 支持的 TTS 引擎\n\n| 引擎 | 说明 | 优点 | 缺点 |\n|------|------|------|------|\n| `edge` ⭐ | 微软神经网络 TTS | 免费、离线、高音质、支持中文 | 需网络下载初期 |\n| `api` | OpenAI 兼容 API | 质量高、可选声音多 | 需要 API Key |\n\n### edge-tts 支持的声音（完整列表）\n\n**中文（大陆）**:\n| 声音 | 风格 |\n|------|------|\n| `zh-CN-XiaoxiaoNeural` | 晓晓（女声，**默认**）|\n| `zh-CN-YunxiNeural` | 云希（男声）|\n| `zh-CN-YunyangNeural` | 云扬（男声）|\n| `zh-CN-XiaoyiNeural` | 晓伊（女声）|\n\n**中文（台湾）**:\n| 声音 | 风格 |\n|------|------|\n| `zh-TW-HsiaoYuNeural` | 小宇（女声）|\n\n**英文**:\n| 声音 | 风格 |\n|------|------|\n| `en-US-JennyNeural` | 美式女声 |\n| `en-US-GuyNeural` | 美式男声 |\n| `en-GB-SoniaNeural` | 英式女声 |\n| `en-GB-RyanNeural` | 英式男声 |\n| `en-AU-NatashaNeural` | 澳式女声 |\n| `en-IN-NeerjaNeural` | 印度女声 |\n\n**日文**:\n| 声音 | 风格 |\n|------|------|\n| `ja-JP-NanamiNeural` | 日语女声 |\n| `ja-JP-MayuNeural` | 日语男声 |\n\n**韩文**:\n| 声音 | 风格 |\n|------|------|\n| `ko-KR-SunHiNeural` | 韩语女声 |\n| `ko-KR-InJoonNeural` | 韩语男声 |\n\n**其他常用**:\n| 声音 | 语言 |\n|------|------|\n| `fr-FR-DeniseNeural` | 法语女声 |\n| `de-DE-KatjaNeural` | 德语女声 |\n| `es-ES-ElviraNeural` | 西班牙语女声 |\n| `ru-RU-SvetlanaNeural` | 俄语女声 |\n| `pt-BR-FranciscaNeural` | 葡萄牙语女声 |\n\n> 💡 查看完整列表：`python3 scripts/tts_edge.py \"test\" --list-voices`\n\n---\n\n## 快速开始\n\n### 1. 安装依赖\n\n```bash\ncd ~/.openclaw/workspace/skills/speech-synthesizer\npip install -r requirements.txt\n```\n\n### 2. 运行（生成飞书语音用这个）\n\n```bash\n# ⭐ tts_simple.py — 输出 OGG/Opus，可直接作为飞书语音发送\npython3 scripts/tts_simple.py \"你好，这是测试语音\"\n\n# 使用指定声音（见下方声音列表）\npython3 scripts/tts_simple.py \"你好\" --voice zh-CN-YunxiNeural\n\n# 使用 API\npython3 scripts/tts_simple.py \"你好\" --engine api \\\n    --api-url https://api.openai.com/v1 \\\n    --api-key sk-xxx \\\n    --voice alloy\n```\n\n### 3. 调节语速和音调\n\n```bash\n# 语速 +10%（稍快）\npython3 scripts/tts_simple.py \"快速播报\" --rate \"+10%\"\n\n# 语速 -10%（稍慢）\npython3 scripts/tts_simple.py \"慢速播报\" --rate \"-10%\"\n\n# 音调升高\npython3 scripts/tts_simple.py \"音调较高\" --pitch \"+5Hz\"\n```\n\n---\n\n## 脚本说明\n\n### scripts/tts_simple.py ⭐ 推荐\n\n通用的文字转语音脚本，**自动输出 OGG/Opus 格式，适合飞书语音消息**。\n\n```bash\npython3 scripts/tts_simple.py \"要转换的文字\" [选项]\n```\n\n**参数**:\n\n| 参数 | 说明 |\n|------|------|\n| `text` | 要转换的文字，或 `.txt` 文件路径 |\n| `--output, -o` | 输出文件路径 |\n| `--engine, -e` | 引擎：`edge`（默认）或 `api` |\n| `--voice, -v` | 声音名称 |\n| `--rate, -r` | 语速，如 `+10%`、`-5%`（仅 edge） |\n| `--pitch, -p` | 音调，如 `+5Hz`、`-3Hz`（仅 edge） |\n| `--api-url` | API URL（api 模式） |\n| `--api-key` | API Key（api 模式） |\n| `--api-model` | API 模型（默认 `tts-1`） |\n\n### scripts/tts_edge.py\n\n纯粹的 edge-tts 脚本，**输出 MP3 格式**（不适合直接发送飞书语音）。\n\n```bash\n# 列出所有声音\npython3 scripts/tts_edge.py \"test\" --list-voices\n\n# 生成语音\npython3 scripts/tts_edge.py \"你好\" -o output.mp3 --voice zh-CN-Xiaoxiao\n```\n\n> 💡 发送飞书语音消息请用 `tts_simple.py`。\n\n---\n\n## 声音列表\n\nedge-tts 支持 100+ 声音，可通过以下命令查看：\n\n```bash\npython3 scripts/tts_edge.py \"test\" --list-voices\n```\n\n常用声音速查：\n\n| 语言 | 代码 | 声音 |\n|------|------|------|\n| 中文女声 | `zh-CN-Xiaoxiao` | 晓晓（默认）|\n| 中文男声 | `zh-CN-Yunxi` | 云希 |\n| 美式女声 | `en-US-Jenny` | Jenny |\n| 美式男声 | `en-US-Guy` | Guy |\n| 英式女声 | `en-GB-Sonia` | Sonia |\n| 日语女声 | `ja-JP-Nanami` | Nanami |\n\n---\n\n## 输出格式\n\n**重要**：飞书语音消息需要 **OGG/Opus** 格式，必须使用 `tts_simple.py`。\n\n| 脚本 | 输出格式 | 适用场景 |\n|------|----------|----------|\n| `tts_simple.py` ⭐ | OGG/Opus | **飞书语音消息**（直接发送） |\n| `tts_edge.py` | MP3 | 通用场景（需转换后才能发飞书语音） |\n\n> `tts_simple.py` 会自动将 edge-tts 输出的 webm 转换为 OGG/Opus，专门适配飞书语音消息。\n\n## 输出目录\n\n运行结果保存在工作区的 `projects/tts/` 目录下：\n\n```\n~/.openclaw/workspace/projects/tts/\n└── output/\n    └── tts_20260401_193000.ogg   # OGG/Opus 格式（飞书语音用这个）\n```\n\n---\n\n## 环境变量\n\n| 变量名 | 说明 |\n|--------|------|\n| `OPENCLAW_WORKSPACE` | 工作区根目录 |\n| `TTS_API_URL` | OpenAI 兼容 API URL |\n| `TTS_API_KEY` | API 密钥 |\n\n---\n\n## 故障排查\n\n### edge-tts 下载失败\n\n```bash\n# 检查网络\ncurl -I https://www.bing.com\n\n# edge-tts 需要访问微软服务\n# 如有代理干扰，清除环境变量\nunset all_proxy ALL_PROXY\n```\n\n### API 模式报错\n\n- 确认 API URL 正确（包含 `/v1`）\n- 确认 API Key 有效\n- 检查账户余额\n\n### 声音不自然\n\n- 中文推荐：`zh-CN-Xiaoxiao`（晓晓）\n- 调节语速 `--rate \"+10%\"` 或 `--rate \"-10%\"`\n- 调节音调 `--pitch \"+3Hz\"` 或 `--pitch \"-3Hz\"`\n\n---\n\n## 平台说明\n\n### edge-tts vs 其他 TTS 方案\n\n| 方案 | 成本 | 音质 | 中文支持 | 离线 | API Key |\n|------|------|------|---------|------|---------|\n| edge-tts | 免费 | 高 | 很好 | 部分 | 不需要 |\n| OpenAI TTS | 按量计费 | 很高 | 一般 | 否 | 需要 |\n| pyttsx3 | 免费 | 低 | 一般 | 是 | 不需要 |\n\n### 已知限制\n\n- edge-tts 依赖微软服务，需要能访问 `edge.microsoft.com`\n- 部分声音在不同地区可能不可用\n\n## 目录结构\n\n```\nspeech-synthesizer/\n├── SKILL.md                    # 本文档\n├── requirements.txt            # Python 依赖\n├── scripts/\n│   ├── tts_simple.py          # 通用 TTS 脚本（⭐ 推荐）\n│   └── tts_edge.py            # edge-tts 专用脚本\n└── models/                    # 模型目录（如需本地模型）\n```\n\nFile v1.0.3:_meta.json\n\n{\n  \"ownerId\": \"kn75k53tcdhqwka2fra5x817p9821zpb\",\n  \"slug\": \"tts-synthesizer\",\n  \"version\": \"1.0.3\",\n  \"publishedAt\": 1775401576034\n}\n\nFile v1.0.3:requirements.txt\n\n# Audio TTS Skill - Python Dependencies\n# Install: pip install -r requirements.txt\n#\n# ⚠️ System dependencies required (install separately):\n#   Ubuntu/Debian: sudo apt install ffmpeg libopus-tools\n#   macOS:         brew install ffmpeg\n#   Windows:       download ffmpeg and add to PATH\n\n# ── Core TTS ─────────────────────────────────────────────────────────────────\n# edge-tts: Microsoft Neural TTS (free, high quality, offline)\nedge-tts>=7.0.0\n\n# ── API Support ───────────────────────────────────────────────────────────────\n# For OpenAI-compatible API TTS\nopenai>=1.0.0\n\n# ── Audio Conversion ─────────────────────────────────────────────────────────\n# av (PyAV): audio/video conversion, required for OGG/Opus conversion\nav>=10.0.0\n\n# ── Core ─────────────────────────────────────────────────────────────────────\naiohttp>=3.8.0\n\nArchive v1.0.2: 5 files, 7945 bytes\n\nFiles: requirements.txt (873b), scripts/tts_edge.py (4508b), scripts/tts_simple.py (6929b), SKILL.md (7180b), _meta.json (134b)\n\nFile v1.0.2:SKILL.md\n\n---\nname: speech-synthesizer\ndescription: |\n  文字转语音（Text-to-Speech）工具。\n  支持 edge-tts（微软神经网络 TTS，免费离线）和 OpenAI 兼容 API TTS。\n  触发词：语音回复、TTS、文字转语音、语音合成、语音对话。\n  适用平台：Linux / Windows / macOS。\n---\n\n# Speech Synthesizer | 语音合成器 🔊\n\n将文字转换为语音，支持微软神经网络 TTS（免费离线）和 OpenAI 兼容 API。\n\n---\n\n## 目录\n\n1. [概述](#概述)\n2. [快速开始](#快速开始)\n3. [脚本说明](#脚本说明)\n4. [声音列表](#声音列表)\n5. [输出目录](#输出目录)\n6. [环境变量](#环境变量)\n7. [故障排查](#故障排查)\n\n---\n\n## 概述\n\n> ⚠️ **注意**：OpenClaw 内置了 `tts` 工具，但它的输出格式（MP3/WebM）不适合直接发送飞书语音。\n> **飞书语音消息必须用 `tts_simple.py`**，它会自动输出 OGG/Opus 格式。\n\n### 支持的 TTS 引擎\n\n| 引擎 | 说明 | 优点 | 缺点 |\n|------|------|------|------|\n| `edge` ⭐ | 微软神经网络 TTS | 免费、离线、高音质、支持中文 | 需网络下载初期 |\n| `api` | OpenAI 兼容 API | 质量高、可选声音多 | 需要 API Key |\n\n### edge-tts 支持的声音（完整列表）\n\n**中文（大陆）**:\n| 声音 | 风格 |\n|------|------|\n| `zh-CN-XiaoxiaoNeural` | 晓晓（女声，**默认**）|\n| `zh-CN-YunxiNeural` | 云希（男声）|\n| `zh-CN-YunyangNeural` | 云扬（男声）|\n| `zh-CN-XiaoyiNeural` | 晓伊（女声）|\n\n**中文（台湾）**:\n| 声音 | 风格 |\n|------|------|\n| `zh-TW-HsiaoYuNeural` | 小宇（女声）|\n\n**英文**:\n| 声音 | 风格 |\n|------|------|\n| `en-US-JennyNeural` | 美式女声 |\n| `en-US-GuyNeural` | 美式男声 |\n| `en-GB-SoniaNeural` | 英式女声 |\n| `en-GB-RyanNeural` | 英式男声 |\n| `en-AU-NatashaNeural` | 澳式女声 |\n| `en-IN-NeerjaNeural` | 印度女声 |\n\n**日文**:\n| 声音 | 风格 |\n|------|------|\n| `ja-JP-NanamiNeural` | 日语女声 |\n| `ja-JP-MayuNeural` | 日语男声 |\n\n**韩文**:\n| 声音 | 风格 |\n|------|------|\n| `ko-KR-SunHiNeural` | 韩语女声 |\n| `ko-KR-InJoonNeural` | 韩语男声 |\n\n**其他常用**:\n| 声音 | 语言 |\n|------|------|\n| `fr-FR-DeniseNeural` | 法语女声 |\n| `de-DE-KatjaNeural` | 德语女声 |\n| `es-ES-ElviraNeural` | 西班牙语女声 |\n| `ru-RU-SvetlanaNeural` | 俄语女声 |\n| `pt-BR-FranciscaNeural` | 葡萄牙语女声 |\n\n> 💡 查看完整列表：`python3 scripts/tts_edge.py \"test\" --list-voices`\n\n---\n\n## 快速开始\n\n### 1. 安装依赖\n\n```bash\ncd ~/.openclaw/workspace/skills/speech-synthesizer\npip install -r requirements.txt\n```\n\n### 2. 运行（生成飞书语音用这个）\n\n```bash\n# ⭐ tts_simple.py — 输出 OGG/Opus，可直接作为飞书语音发送\npython3 scripts/tts_simple.py \"你好，这是测试语音\"\n\n# 使用指定声音（见下方声音列表）\npython3 scripts/tts_simple.py \"你好\" --voice zh-CN-YunxiNeural\n\n# 使用 API\npython3 scripts/tts_simple.py \"你好\" --engine api \\\n    --api-url https://api.openai.com/v1 \\\n    --api-key sk-xxx \\\n    --voice alloy\n```\n\n### 3. 调节语速和音调\n\n```bash\n# 语速 +10%（稍快）\npython3 scripts/tts_simple.py \"快速播报\" --rate \"+10%\"\n\n# 语速 -10%（稍慢）\npython3 scripts/tts_simple.py \"慢速播报\" --rate \"-10%\"\n\n# 音调升高\npython3 scripts/tts_simple.py \"音调较高\" --pitch \"+5Hz\"\n```\n\n---\n\n## 脚本说明\n\n### scripts/tts_simple.py ⭐ 推荐\n\n通用的文字转语音脚本，**自动输出 OGG/Opus 格式，适合飞书语音消息**。\n\n```bash\npython3 scripts/tts_simple.py \"要转换的文字\" [选项]\n```\n\n**参数**:\n\n| 参数 | 说明 |\n|------|------|\n| `text` | 要转换的文字，或 `.txt` 文件路径 |\n| `--output, -o` | 输出文件路径 |\n| `--engine, -e` | 引擎：`edge`（默认）或 `api` |\n| `--voice, -v` | 声音名称 |\n| `--rate, -r` | 语速，如 `+10%`、`-5%`（仅 edge） |\n| `--pitch, -p` | 音调，如 `+5Hz`、`-3Hz`（仅 edge） |\n| `--api-url` | API URL（api 模式） |\n| `--api-key` | API Key（api 模式） |\n| `--api-model` | API 模型（默认 `tts-1`） |\n\n### scripts/tts_edge.py\n\n纯粹的 edge-tts 脚本，**输出 MP3 格式**（不适合直接发送飞书语音）。\n\n```bash\n# 列出所有声音\npython3 scripts/tts_edge.py \"test\" --list-voices\n\n# 生成语音\npython3 scripts/tts_edge.py \"你好\" -o output.mp3 --voice zh-CN-Xiaoxiao\n```\n\n> 💡 发送飞书语音消息请用 `tts_simple.py`。\n\n---\n\n## 声音列表\n\nedge-tts 支持 100+ 声音，可通过以下命令查看：\n\n```bash\npython3 scripts/tts_edge.py \"test\" --list-voices\n```\n\n常用声音速查：\n\n| 语言 | 代码 | 声音 |\n|------|------|------|\n| 中文女声 | `zh-CN-Xiaoxiao` | 晓晓（默认）|\n| 中文男声 | `zh-CN-Yunxi` | 云希 |\n| 美式女声 | `en-US-Jenny` | Jenny |\n| 美式男声 | `en-US-Guy` | Guy |\n| 英式女声 | `en-GB-Sonia` | Sonia |\n| 日语女声 | `ja-JP-Nanami` | Nanami |\n\n---\n\n## 输出格式\n\n**重要**：飞书语音消息需要 **OGG/Opus** 格式，必须使用 `tts_simple.py`。\n\n| 脚本 | 输出格式 | 适用场景 |\n|------|----------|----------|\n| `tts_simple.py` ⭐ | OGG/Opus | **飞书语音消息**（直接发送） |\n| `tts_edge.py` | MP3 | 通用场景（需转换后才能发飞书语音） |\n\n> `tts_simple.py` 会自动将 edge-tts 输出的 webm 转换为 OGG/Opus，专门适配飞书语音消息。\n\n## 输出目录\n\n运行结果保存在工作区的 `projects/tts/` 目录下：\n\n```\n~/.openclaw/workspace/projects/tts/\n└── output/\n    └── tts_20260401_193000.ogg   # OGG/Opus 格式（飞书语音用这个）\n```\n\n---\n\n## 环境变量\n\n| 变量名 | 说明 |\n|--------|------|\n| `OPENCLAW_WORKSPACE` | 工作区根目录 |\n| `TTS_API_URL` | OpenAI 兼容 API URL |\n| `TTS_API_KEY` | API 密钥 |\n\n---\n\n## 故障排查\n\n### edge-tts 下载失败\n\n```bash\n# 检查网络\ncurl -I https://www.bing.com\n\n# edge-tts 需要访问微软服务\n# 如有代理干扰，清除环境变量\nunset all_proxy ALL_PROXY\n```\n\n### API 模式报错\n\n- 确认 API URL 正确（包含 `/v1`）\n- 确认 API Key 有效\n- 检查账户余额\n\n### 声音不自然\n\n- 中文推荐：`zh-CN-Xiaoxiao`（晓晓）\n- 调节语速 `--rate \"+10%\"` 或 `--rate \"-10%\"`\n- 调节音调 `--pitch \"+3Hz\"` 或 `--pitch \"-3Hz\"`\n\n---\n\n## 平台说明\n\n### edge-tts vs 其他 TTS 方案\n\n| 方案 | 成本 | 音质 | 中文支持 | 离线 | API Key |\n|------|------|------|---------|------|---------|\n| edge-tts | 免费 | 高 | 很好 | 部分 | 不需要 |\n| OpenAI TTS | 按量计费 | 很高 | 一般 | 否 | 需要 |\n| pyttsx3 | 免费 | 低 | 一般 | 是 | 不需要 |\n\n### 已知限制\n\n- edge-tts 依赖微软服务，需要能访问 `edge.microsoft.com`\n- 部分声音在不同地区可能不可用\n\n## 目录结构\n\n```\nspeech-synthesizer/\n├── SKILL.md                    # 本文档\n├── requirements.txt            # Python 依赖\n├── scripts/\n│   ├── tts_simple.py          # 通用 TTS 脚本（⭐ 推荐）\n│   └── tts_edge.py            # edge-tts 专用脚本\n└── models/                    # 模型目录（如需本地模型）\n```\n\nFile v1.0.2:_meta.json\n\n{\n  \"ownerId\": \"kn75k53tcdhqwka2fra5x817p9821zpb\",\n  \"slug\": \"tts-synthesizer\",\n  \"version\": \"1.0.2\",\n  \"publishedAt\": 1775228678454\n}\n\nFile v1.0.2:requirements.txt\n\n# Audio TTS Skill - Python Dependencies\n# Install: pip install -r requirements.txt\n\n# ── Core TTS ─────────────────────────────────────────────────────────────────\n# edge-tts: Microsoft Neural TTS (free, high quality, offline)\nedge-tts>=7.0.0\n\n# ── API Support ───────────────────────────────────────────────────────────────\n# For OpenAI-compatible API TTS\nopenai>=1.0.0\n\n# ── Core ─────────────────────────────────────────────────────────────────────\naiohttp>=3.8.0\n\nArchive v1.0.1: 5 files, 7945 bytes\n\nFiles: requirements.txt (873b), scripts/tts_edge.py (4508b), scripts/tts_simple.py (6929b), SKILL.md (7180b), _meta.json (134b)\n\nFile v1.0.1:SKILL.md\n\n---\nname: speech-synthesizer\ndescription: |\n  文字转语音（Text-to-Speech）工具。\n  支持 edge-tts（微软神经网络 TTS，免费离线）和 OpenAI 兼容 API TTS。\n  触发词：语音回复、TTS、文字转语音、语音合成、语音对话。\n  适用平台：Linux / Windows / macOS。\n---\n\n# Speech Synthesizer | 语音合成器 🔊\n\n将文字转换为语音，支持微软神经网络 TTS（免费离线）和 OpenAI 兼容 API。\n\n---\n\n## 目录\n\n1. [概述](#概述)\n2. [快速开始](#快速开始)\n3. [脚本说明](#脚本说明)\n4. [声音列表](#声音列表)\n5. [输出目录](#输出目录)\n6. [环境变量](#环境变量)\n7. [故障排查](#故障排查)\n\n---\n\n## 概述\n\n> ⚠️ **注意**：OpenClaw 内置了 `tts` 工具，但它的输出格式（MP3/WebM）不适合直接发送飞书语音。\n> **飞书语音消息必须用 `tts_simple.py`**，它会自动输出 OGG/Opus 格式。\n\n### 支持的 TTS 引擎\n\n| 引擎 | 说明 | 优点 | 缺点 |\n|------|------|------|------|\n| `edge` ⭐ | 微软神经网络 TTS | 免费、离线、高音质、支持中文 | 需网络下载初期 |\n| `api` | OpenAI 兼容 API | 质量高、可选声音多 | 需要 API Key |\n\n### edge-tts 支持的声音（完整列表）\n\n**中文（大陆）**:\n| 声音 | 风格 |\n|------|------|\n| `zh-CN-XiaoxiaoNeural` | 晓晓（女声，**默认**）|\n| `zh-CN-YunxiNeural` | 云希（男声）|\n| `zh-CN-YunyangNeural` | 云扬（男声）|\n| `zh-CN-XiaoyiNeural` | 晓伊（女声）|\n\n**中文（台湾）**:\n| 声音 | 风格 |\n|------|------|\n| `zh-TW-HsiaoYuNeural` | 小宇（女声）|\n\n**英文**:\n| 声音 | 风格 |\n|------|------|\n| `en-US-JennyNeural` | 美式女声 |\n| `en-US-GuyNeural` | 美式男声 |\n| `en-GB-SoniaNeural` | 英式女声 |\n| `en-GB-RyanNeural` | 英式男声 |\n| `en-AU-NatashaNeural` | 澳式女声 |\n| `en-IN-NeerjaNeural` | 印度女声 |\n\n**日文**:\n| 声音 | 风格 |\n|------|------|\n| `ja-JP-NanamiNeural` | 日语女声 |\n| `ja-JP-MayuNeural` | 日语男声 |\n\n**韩文**:\n| 声音 | 风格 |\n|------|------|\n| `ko-KR-SunHiNeural` | 韩语女声 |\n| `ko-KR-InJoonNeural` | 韩语男声 |\n\n**其他常用**:\n| 声音 | 语言 |\n|------|------|\n| `fr-FR-DeniseNeural` | 法语女声 |\n| `de-DE-KatjaNeural` | 德语女声 |\n| `es-ES-ElviraNeural` | 西班牙语女声 |\n| `ru-RU-SvetlanaNeural` | 俄语女声 |\n| `pt-BR-FranciscaNeural` | 葡萄牙语女声 |\n\n> 💡 查看完整列表：`python3 scripts/tts_edge.py \"test\" --list-voices`\n\n---\n\n## 快速开始\n\n### 1. 安装依赖\n\n```bash\ncd ~/.openclaw/workspace/skills/speech-synthesizer\npip install -r requirements.txt\n```\n\n### 2. 运行（生成飞书语音用这个）\n\n```bash\n# ⭐ tts_simple.py — 输出 OGG/Opus，可直接作为飞书语音发送\npython3 scripts/tts_simple.py \"你好，这是测试语音\"\n\n# 使用指定声音（见下方声音列表）\npython3 scripts/tts_simple.py \"你好\" --voice zh-CN-YunxiNeural\n\n# 使用 API\npython3 scripts/tts_simple.py \"你好\" --engine api \\\n    --api-url https://api.openai.com/v1 \\\n    --api-key sk-xxx \\\n    --voice alloy\n```\n\n### 3. 调节语速和音调\n\n```bash\n# 语速 +10%（稍快）\npython3 scripts/tts_simple.py \"快速播报\" --rate \"+10%\"\n\n# 语速 -10%（稍慢）\npython3 scripts/tts_simple.py \"慢速播报\" --rate \"-10%\"\n\n# 音调升高\npython3 scripts/tts_simple.py \"音调较高\" --pitch \"+5Hz\"\n```\n\n---\n\n## 脚本说明\n\n### scripts/tts_simple.py ⭐ 推荐\n\n通用的文字转语音脚本，**自动输出 OGG/Opus 格式，适合飞书语音消息**。\n\n```bash\npython3 scripts/tts_simple.py \"要转换的文字\" [选项]\n```\n\n**参数**:\n\n| 参数 | 说明 |\n|------|------|\n| `text` | 要转换的文字，或 `.txt` 文件路径 |\n| `--output, -o` | 输出文件路径 |\n| `--engine, -e` | 引擎：`edge`（默认）或 `api` |\n| `--voice, -v` | 声音名称 |\n| `--rate, -r` | 语速，如 `+10%`、`-5%`（仅 edge） |\n| `--pitch, -p` | 音调，如 `+5Hz`、`-3Hz`（仅 edge） |\n| `--api-url` | API URL（api 模式） |\n| `--api-key` | API Key（api 模式） |\n| `--api-model` | API 模型（默认 `tts-1`） |\n\n### scripts/tts_edge.py\n\n纯粹的 edge-tts 脚本，**输出 MP3 格式**（不适合直接发送飞书语音）。\n\n```bash\n# 列出所有声音\npython3 scripts/tts_edge.py \"test\" --list-voices\n\n# 生成语音\npython3 scripts/tts_edge.py \"你好\" -o output.mp3 --voice zh-CN-Xiaoxiao\n```\n\n> 💡 发送飞书语音消息请用 `tts_simple.py`。\n\n---\n\n## 声音列表\n\nedge-tts 支持 100+ 声音，可通过以下命令查看：\n\n```bash\npython3 scripts/tts_edge.py \"test\" --list-voices\n```\n\n常用声音速查：\n\n| 语言 | 代码 | 声音 |\n|------|------|------|\n| 中文女声 | `zh-CN-Xiaoxiao` | 晓晓（默认）|\n| 中文男声 | `zh-CN-Yunxi` | 云希 |\n| 美式女声 | `en-US-Jenny` | Jenny |\n| 美式男声 | `en-US-Guy` | Guy |\n| 英式女声 | `en-GB-Sonia` | Sonia |\n| 日语女声 | `ja-JP-Nanami` | Nanami |\n\n---\n\n## 输出格式\n\n**重要**：飞书语音消息需要 **OGG/Opus** 格式，必须使用 `tts_simple.py`。\n\n| 脚本 | 输出格式 | 适用场景 |\n|------|----------|----------|\n| `tts_simple.py` ⭐ | OGG/Opus | **飞书语音消息**（直接发送） |\n| `tts_edge.py` | MP3 | 通用场景（需转换后才能发飞书语音） |\n\n> `tts_simple.py` 会自动将 edge-tts 输出的 webm 转换为 OGG/Opus，专门适配飞书语音消息。\n\n## 输出目录\n\n运行结果保存在工作区的 `projects/tts/` 目录下：\n\n```\n~/.openclaw/workspace/projects/tts/\n└── output/\n    └── tts_20260401_193000.ogg   # OGG/Opus 格式（飞书语音用这个）\n```\n\n---\n\n## 环境变量\n\n| 变量名 | 说明 |\n|--------|------|\n| `OPENCLAW_WORKSPACE` | 工作区根目录 |\n| `TTS_API_URL` | OpenAI 兼容 API URL |\n| `TTS_API_KEY` | API 密钥 |\n\n---\n\n## 故障排查\n\n### edge-tts 下载失败\n\n```bash\n# 检查网络\ncurl -I https://www.bing.com\n\n# edge-tts 需要访问微软服务\n# 如有代理干扰，清除环境变量\nunset all_proxy ALL_PROXY\n```\n\n### API 模式报错\n\n- 确认 API URL 正确（包含 `/v1`）\n- 确认 API Key 有效\n- 检查账户余额\n\n### 声音不自然\n\n- 中文推荐：`zh-CN-Xiaoxiao`（晓晓）\n- 调节语速 `--rate \"+10%\"` 或 `--rate \"-10%\"`\n- 调节音调 `--pitch \"+3Hz\"` 或 `--pitch \"-3Hz\"`\n\n---\n\n## 平台说明\n\n### edge-tts vs 其他 TTS 方案\n\n| 方案 | 成本 | 音质 | 中文支持 | 离线 | API Key |\n|------|------|------|---------|------|---------|\n| edge-tts | 免费 | 高 | 很好 | 部分 | 不需要 |\n| OpenAI TTS | 按量计费 | 很高 | 一般 | 否 | 需要 |\n| pyttsx3 | 免费 | 低 | 一般 | 是 | 不需要 |\n\n### 已知限制\n\n- edge-tts 依赖微软服务，需要能访问 `edge.microsoft.com`\n- 部分声音在不同地区可能不可用\n\n## 目录结构\n\n```\nspeech-synthesizer/\n├── SKILL.md                    # 本文档\n├── requirements.txt            # Python 依赖\n├── scripts/\n│   ├── tts_simple.py          # 通用 TTS 脚本（⭐ 推荐）\n│   └── tts_edge.py            # edge-tts 专用脚本\n└── models/                    # 模型目录（如需本地模型）\n```\n\nFile v1.0.1:_meta.json\n\n{\n  \"ownerId\": \"kn75k53tcdhqwka2fra5x817p9821zpb\",\n  \"slug\": \"tts-synthesizer\",\n  \"version\": \"1.0.1\",\n  \"publishedAt\": 1775221160545\n}\n\nFile v1.0.1:requirements.txt\n\n# Audio TTS Skill - Python Dependencies\n# Install: pip install -r requirements.txt\n\n# ── Core TTS ─────────────────────────────────────────────────────────────────\n# edge-tts: Microsoft Neural TTS (free, high quality, offline)\nedge-tts>=7.0.0\n\n# ── API Support ───────────────────────────────────────────────────────────────\n# For OpenAI-compatible API TTS\nopenai>=1.0.0\n\n# ── Core ─────────────────────────────────────────────────────────────────────\naiohttp>=3.8.0\n\nArchive v1.0.0: 8 files, 9906 bytes\n\nFiles: README.md (1128b), references/deployment.md (1388b), references/platform.md (668b), requirements.txt (873b), scripts/tts_edge.py (4508b), scripts/tts_simple.py (6929b), SKILL.md (5732b), _meta.json (134b)\n\nFile v1.0.0:SKILL.md\n\n---\nname: speech-synthesizer\ndescription: |\n  文字转语音（Text-to-Speech）工具。\n  支持 edge-tts（微软神经网络 TTS，免费离线）和 OpenAI 兼容 API TTS。\n  触发词：语音回复、TTS、文字转语音、语音合成。\n  适用平台：Linux / Windows / macOS。\n---\n\n# Speech Synthesizer | 语音合成器 🔊\n\n将文字转换为语音，支持微软神经网络 TTS（免费离线）和 OpenAI 兼容 API。\n\n---\n\n## 目录\n\n1. [概述](#概述)\n2. [快速开始](#快速开始)\n3. [脚本说明](#脚本说明)\n4. [声音列表](#声音列表)\n5. [输出目录](#输出目录)\n6. [环境变量](#环境变量)\n7. [故障排查](#故障排查)\n\n---\n\n## 概述\n\n### 支持的 TTS 引擎\n\n| 引擎 | 说明 | 优点 | 缺点 |\n|------|------|------|------|\n| `edge` ⭐ | 微软神经网络 TTS | 免费、离线、高音质、支持中文 | 需网络下载初期 |\n| `api` | OpenAI 兼容 API | 质量高、可选声音多 | 需要 API Key |\n\n### edge-tts 支持的声音\n\n**中文**:\n- `zh-CN-Xiaoxiao` — 晓晓（女声，默认）\n- `zh-CN-Yunxi` — 云希（男声）\n- `zh-CN-Yunyang` — 云扬（男声）\n- `zh-CN-Xiaoyi` — 晓伊（女声）\n\n**英文**:\n- `en-US-Jenny` — 美式女声\n- `en-US-Guy` — 美式男声\n- `en-GB-Sonia` — 英式女声\n- `en-GB-Ryan` — 英式男声\n\n**日语**:\n- `ja-JP-Nanami` — 日语女声\n- `ja-JP-Mayu` — 日语男声\n\n---\n\n## 快速开始\n\n### 1. 安装依赖\n\n```bash\ncd ~/.openclaw/workspace/skills/speech-synthesizer\npip install -r requirements.txt\n```\n\n### 2. 运行（生成飞书语音用这个）\n\n```bash\n# ⭐ tts_simple.py — 输出 OGG/Opus，可直接作为飞书语音发送\npython3 scripts/tts_simple.py \"你好，这是测试语音\"\n\n# 使用指定声音\npython3 scripts/tts_simple.py \"Hello world\" --voice en-US-Jenny\n\n# 使用 API\npython3 scripts/tts_simple.py \"你好\" --engine api \\\n    --api-url https://api.openai.com/v1 \\\n    --api-key sk-xxx \\\n    --voice alloy\n```\n\n### 3. 调节语速和音调\n\n```bash\n# 语速 +10%（稍快）\npython3 scripts/tts_simple.py \"快速播报\" --rate \"+10%\"\n\n# 语速 -10%（稍慢）\npython3 scripts/tts_simple.py \"慢速播报\" --rate \"-10%\"\n\n# 音调升高\npython3 scripts/tts_simple.py \"音调较高\" --pitch \"+5Hz\"\n```\n\n---\n\n## 脚本说明\n\n### scripts/tts_simple.py ⭐ 推荐\n\n通用的文字转语音脚本，**自动输出 OGG/Opus 格式，适合飞书语音消息**。\n\n```bash\npython3 scripts/tts_simple.py \"要转换的文字\" [选项]\n```\n\n**参数**:\n\n| 参数 | 说明 |\n|------|------|\n| `text` | 要转换的文字，或 `.txt` 文件路径 |\n| `--output, -o` | 输出文件路径 |\n| `--engine, -e` | 引擎：`edge`（默认）或 `api` |\n| `--voice, -v` | 声音名称 |\n| `--rate, -r` | 语速，如 `+10%`、`-5%`（仅 edge） |\n| `--pitch, -p` | 音调，如 `+5Hz`、`-3Hz`（仅 edge） |\n| `--api-url` | API URL（api 模式） |\n| `--api-key` | API Key（api 模式） |\n| `--api-model` | API 模型（默认 `tts-1`） |\n\n### scripts/tts_edge.py\n\n纯粹的 edge-tts 脚本，**输出 MP3 格式**（不适合直接发送飞书语音）。\n\n```bash\n# 列出所有声音\npython3 scripts/tts_edge.py \"test\" --list-voices\n\n# 生成语音\npython3 scripts/tts_edge.py \"你好\" -o output.mp3 --voice zh-CN-Xiaoxiao\n```\n\n> 💡 发送飞书语音消息请用 `tts_simple.py`。\n\n---\n\n## 声音列表\n\nedge-tts 支持 100+ 声音，可通过以下命令查看：\n\n```bash\npython3 scripts/tts_edge.py \"test\" --list-voices\n```\n\n常用声音速查：\n\n| 语言 | 代码 | 声音 |\n|------|------|------|\n| 中文女声 | `zh-CN-Xiaoxiao` | 晓晓（默认）|\n| 中文男声 | `zh-CN-Yunxi` | 云希 |\n| 美式女声 | `en-US-Jenny` | Jenny |\n| 美式男声 | `en-US-Guy` | Guy |\n| 英式女声 | `en-GB-Sonia` | Sonia |\n| 日语女声 | `ja-JP-Nanami` | Nanami |\n\n---\n\n## 输出格式\n\n**重要**：飞书语音消息需要 **OGG/Opus** 格式，必须使用 `tts_simple.py`。\n\n| 脚本 | 输出格式 | 适用场景 |\n|------|----------|----------|\n| `tts_simple.py` ⭐ | OGG/Opus | **飞书语音消息**（直接发送） |\n| `tts_edge.py` | MP3 | 通用场景（需转换后才能发飞书语音） |\n\n> `tts_simple.py` 会自动将 edge-tts 输出的 webm 转换为 OGG/Opus，专门适配飞书语音消息。\n\n## 输出目录\n\n运行结果保存在工作区的 `projects/tts/` 目录下：\n\n```\n~/.openclaw/workspace/projects/tts/\n└── output/\n    └── tts_20260401_193000.ogg   # OGG/Opus 格式（飞书语音用这个）\n```\n\n---\n\n## 环境变量\n\n| 变量名 | 说明 |\n|--------|------|\n| `OPENCLAW_WORKSPACE` | 工作区根目录 |\n| `TTS_API_URL` | OpenAI 兼容 API URL |\n| `TTS_API_KEY` | API 密钥 |\n\n---\n\n## 故障排查\n\n### edge-tts 下载失败\n\n```bash\n# 检查网络\ncurl -I https://www.bing.com\n\n# edge-tts 需要访问微软服务\n# 如有代理干扰，清除环境变量\nunset all_proxy ALL_PROXY\n```\n\n### API 模式报错\n\n- 确认 API URL 正确（包含 `/v1`）\n- 确认 API Key 有效\n- 检查账户余额\n\n### 声音不自然\n\n- 中文推荐：`zh-CN-Xiaoxiao`（晓晓）\n- 调节语速 `--rate \"+10%\"` 或 `--rate \"-10%\"`\n- 调节音调 `--pitch \"+3Hz\"` 或 `--pitch \"-3Hz\"`\n\n---\n\n## 目录结构\n\n```\naudio-tts/\n├── SKILL.md                    # 本文档\n├── README.md                   # 快速开始\n├── requirements.txt            # Python 依赖\n├── scripts/\n│   ├── tts_simple.py          # 通用 TTS 脚本\n│   └── tts_edge.py            # edge-tts 专用脚本\n├── models/                    # 模型目录（如需本地模型）\n└── references/\n    ├── deployment.md          # 部署指南\n    └── platform.md           # 平台笔记\n```\n\nFile v1.0.0:README.md\n\n# Speech Synthesizer | 语音合成器 🔊\n\n> 文字转语音，支持微软神经网络 TTS（免费离线）和 OpenAI 兼容 API\n\n![Platform](https://img.shields.io/badge/platform-Linux%20%7C%20Windows%20%7C%20macOS-blue)\n![Python](https://img.shields.io/badge/python-3.8+-green)\n\n## 功能特性\n\n- 🔊 **edge-tts** — 微软神经网络 TTS，免费离线，高音质\n- 🌐 **API 模式** — 支持 OpenAI 兼容 API\n- 🇨🇳 **中文支持** — 晓晓、云希、云扬等多种中文声音\n- ⚡ **离线可用** — edge-tts 无需 API Key\n\n## 快速开始\n\n### 1. 安装依赖\n\n```bash\ncd ~/.openclaw/workspace/skills/audio-tts\npip install -r requirements.txt\n```\n\n### 2. 运行\n\n```bash\n# edge-tts（默认，免费）\npython3 scripts/tts_simple.py \"你好，这是语音合成测试\"\n\n# 英文声音\npython3 scripts/tts_simple.py \"Hello world\" --voice en-US-Jenny\n\n# API 模式\npython3 scripts/tts_simple.py \"Hello\" --engine api \\\n    --api-url https://api.openai.com/v1 \\\n    --api-key your-key\n```\n\n## 输出目录\n\n```\n~/.openclaw/workspace/projects/tts/output/\n```\n\n## 文档\n\n详见 [SKILL.md](SKILL.md)\n\nFile v1.0.0:_meta.json\n\n{\n  \"ownerId\": \"kn75k53tcdhqwka2fra5x817p9821zpb\",\n  \"slug\": \"tts-synthesizer\",\n  \"version\": \"1.0.0\",\n  \"publishedAt\": 1775096807898\n}\n\nFile v1.0.0:references/deployment.md\n\n# Audio TTS Skill 部署指南\n\n---\n\n## 系统要求\n\n### 软件\n- **Python**: 3.8+\n- **网络**: 首次运行需要网络以下载 edge-tts 数据（之后可离线）\n\n### 操作系统\n- Linux / Windows / macOS 皆可\n\n---\n\n## 快速部署\n\n### Linux / macOS\n\n```bash\ncd ~/.openclaw/workspace/skills/audio-tts\npip install -r requirements.txt\npython3 scripts/tts_simple.py \"测试语音\"\n```\n\n### Windows\n\n```powershell\ncd $env:USERPROFILE\\.openclaw\\workspace\\skills\\audio-tts\npip install -r requirements.txt\npython scripts/tts_simple.py \"测试语音\"\n```\n\n---\n\n## 依赖说明\n\n### edge-tts\n\n微软神经网络 TTS，特点：\n- 免费使用\n- 无需 API Key\n- 音质好，支持中文\n- 需要网络下载初期数据\n\n### openai (API 模式)\n\n当 edge-tts 不满足需求时，可使用 OpenAI 兼容 API：\n\n```bash\nexport TTS_API_URL=https://api.openai.com/v1\nexport TTS_API_KEY=sk-your-key\npython3 scripts/tts_simple.py \"Hello\" --engine api\n```\n\n---\n\n## 故障排查\n\n### edge-tts 无法连接\n\n检查网络连接：\n```bash\ncurl -I https://www.bing.com\n```\n\n如有代理干扰：\n```bash\nunset all_proxy ALL_PROXY http_proxy https_proxy\n```\n\n### 无声音输出\n\n- 检查输出文件是否生成\n- 确认音频播放器可用：`mpg123 output.mp3` 或浏览器打开\n\n### 中文声音不自然\n\n推荐使用 `zh-CN-Xiaoxiao`（晓晓），是中文效果最好的声音之一。\n\nFile v1.0.0:references/platform.md\n\n# Audio TTS Skill - 平台笔记\n\n## 测试环境\n\n- OS: Linux (通用)\n- TTS: edge-tts 7.x\n- Python: 3.12\n\n## edge-tts vs 其他 TTS\n\n| 方案 | 成本 | 音质 | 中文支持 | 离线 | API Key |\n|------|------|------|---------|------|---------|\n| edge-tts | 免费 | 高 | 很好 | 部分 | 不需要 |\n| OpenAI TTS | 按量计费 | 很高 | 一般 | 否 | 需要 |\n| pyttsx3 | 免费 | 低 | 一般 | 是 | 不需要 |\n\n## 平台兼容性\n\n- **Linux**: ✅ 完全支持\n- **Windows**: ✅ 完全支持\n- **macOS**: ✅ 完全支持\n\n## 已知限制\n\n- edge-tts 依赖微软服务，需要能访问 `edge.microsoft.com`\n- 部分声音在不同地区可能不可用\n\nFile v1.0.0:requirements.txt\n\n# Audio TTS Skill - Python Dependencies\n# Install: pip install -r requirements.txt\n\n# ── Core TTS ─────────────────────────────────────────────────────────────────\n# edge-tts: Microsoft Neural TTS (free, high quality, offline)\nedge-tts>=7.0.0\n\n# ── API Support ───────────────────────────────────────────────────────────────\n# For OpenAI-compatible API TTS\nopenai>=1.0.0\n\n# ── Core ─────────────────────────────────────────────────────────────────────\naiohttp>=3.8.0","readmeExcerpt":"Skill: TTS Synthesizer | TTS 合成器 Owner: moroiser Summary: 文字转语音（Text-to-Speech / TTS）工具。 支持 edge-tts（微软神经网络 TTS，在线合成）和 OpenAI 兼容 API TTS。 触发词：语音回复、TTS、文字转语音、语音合成、语音对话。 适用平台：Linux / Windows / macOS。 Tags: latest:1.0.9 Version history: v1.0.9 | 2026-04-29T14:52:50.848Z | user test v1.0.8 | 2026-04-29T14:08:54.737Z | user 1. Fix all internal path references and display names to match the renamed tts-synthesizer slug. 修复","codeSnippets":[],"executableExamples":[{"language":"bash","snippet":"cd ~/.openclaw/workspace/skills/tts-synthesizer\npip install -r requirements.txt"},{"language":"bash","snippet":"# ⭐ tts_simple.py — 输出 OGG/Opus，可直接作为飞书语音发送\npython3 scripts/tts_simple.py \"你好，这是测试语音\"\n\n# 使用指定声音（见下方声音列表）\npython3 scripts/tts_simple.py \"你好\" --voice zh-CN-YunxiNeural\n\n# 使用 API\npython3 scripts/tts_simple.py \"你好\" --engine api \\\n    --api-url https://api.openai.com/v1 \\\n    --api-key sk-xxx \\\n    --voice alloy"},{"language":"bash","snippet":"# 语速 +10%（稍快）\npython3 scripts/tts_simple.py \"快速播报\" --rate \"+10%\"\n\n# 语速 -10%（稍慢）\npython3 scripts/tts_simple.py \"慢速播报\" --rate \"-10%\"\n\n# 音调升高\npython3 scripts/tts_simple.py \"音调较高\" --pitch \"+5Hz\""},{"language":"bash","snippet":"python3 scripts/tts_simple.py \"要转换的文字\" [选项]"},{"language":"bash","snippet":"# 列出所有声音\npython3 scripts/tts_edge.py \"test\" --list-voices\n\n# 生成语音\npython3 scripts/tts_edge.py \"你好\" -o output.mp3 --voice zh-CN-Xiaoxiao"},{"language":"bash","snippet":"python3 scripts/tts_edge.py \"test\" --list-voices"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: TTS Synthesizer | TTS 合成器\ndescription: |\n  文字转语音（Text-to-Speech / TTS）工具。\n  支持 edge-tts（微软神经网络 TTS，在线合成）和 OpenAI 兼容 API TTS。\n  触发词：语音回复、TTS、文字转语音、语音合成、语音对话。\n  适用平台：Linux / Windows / macOS。\n---\n\n# TTS Synthesizer | TTS 合成器 🔊\n\n将文字转换为语音，支持微软神经网络 TTS（联网合成）和 OpenAI 兼容 API。\n\n## 目录\n\n1. [概述](#概述)\n2. [快速开始](#快速开始)\n3. [脚本说明](#脚本说明)\n4. [声音列表](#声音列表)\n5. [输出目录](#输出目录)\n6. [环境变量](#环境变量)\n7. [故障排查](#故障排查)\n\n---\n\n## 概述\n\n> ⚠️ **注意**：OpenClaw 内置了 `tts` 工具，但它的输出格式（MP3/WebM）不适合直接发送飞书语音。\n> **飞书语音消息必须用 `tts_simple.py`**，它会自动输出 OGG/Opus 格式。\n\n### 支持的 TTS 引擎\n\n| 引擎 | 说明 | 优点 | 缺点 |\n|------|------|------|------|\n| `edge` ⭐ | 微软神经网络 TTS | 免费、联网合成、高音质、支持中文 | 需访问微软服务 |\n| `api` | OpenAI 兼容 API | 质量高、可选声音多 | 需要 API Key |\n\n### edge-tts 支持的声音（完整列表）\n\n**中文（大陆）**:\n| 声音 | 风格 |\n|------|------|\n| `zh-CN-XiaoxiaoNeural` | 晓晓（女声，**默认**）|\n| `zh-CN-YunxiNeural` | 云希（男声）|\n| `zh-CN-YunyangNeural` | 云扬（男声）|\n| `zh-CN-XiaoyiNeural` | 晓伊（女声）|\n\n**中文（台湾）**:\n| 声音 | 风格 |\n|------|------|\n| `zh-TW-HsiaoYuNeural` | 小宇（女声）|\n\n**英文**:\n| 声音 | 风格 |\n|------|------|\n| `en-US-JennyNeural` | 美式女声 |\n| `en-US-GuyNeural` | 美式男声 |\n| `en-GB-SoniaNeural` | 英式女声 |\n| `en-GB-RyanNeural` | 英式男声 |\n| `en-AU-NatashaNeural` | 澳式女声 |\n| `en-IN-NeerjaNeural` | 印度女声 |\n\n**日文**:\n| 声音 | 风格 |\n|------|------|\n| `ja-JP-NanamiNeural` | 日语女声 |\n| `ja-JP-MayuNeural` | 日语男声 |\n\n**韩文**:\n| 声音 | 风格 |\n|------|------|\n| `ko-KR-SunHiNeural` | 韩语女声 |\n| `ko-KR-InJoonNeural` | 韩语男声 |\n\n**其他常用**:\n| 声音 | 语言 |\n|------|------|\n| `fr-FR-DeniseNeural` | 法语女声 |\n| `de-DE-KatjaNeural` | 德语女声 |\n| `es-ES-ElviraNeural` | 西班牙语女声 |\n| `ru-RU-SvetlanaNeural` | 俄语女声 |\n| `pt-BR-FranciscaNeural` | 葡萄牙语女声 |\n\n> 💡 查看完整列表：`python3 scripts/tts_edge.py \"test\" --list-voices`\n\n---\n\n## 快速开始\n\n### 1. 安装依赖\n\n```bash\ncd ~/.openclaw/workspace/skills/tts-synthesizer\npip install -r requirements.txt\n```\n\n### 2. 运行（生成飞书语音用这个）\n\n```bash\n# ⭐ tts_simple.py — 输出 OGG/Opus，可直接作为飞书语音发送\npython3 scripts/tts_simple.py \"你好，这是测试语音\"\n\n# 使用指定声音（见下方声音列表）\npython3 scripts/tts_simple.py \"你好\" --voice zh-CN-YunxiNeural\n\n# 使用 API\npython3 scripts/tts_simple.py \"你好\" --engine api \\\n    --api-url https://api.openai.com/v1 \\\n    --api-key sk-xxx \\\n    --voice alloy\n```\n\n### 3. 调节语速和音调\n\n```bash\n# 语速 +10%（稍快）\npython3 scripts/tts_simple.py \"快速播报\" --rate \"+10%\"\n\n# 语速 -10%（稍慢）\npython3 scripts/tts_simple.py \"慢速播报\" --rate \"-10%\"\n\n# 音调升高\npython3 scripts/tts_simple.py \"音调较高\" --pitch \"+5Hz\"\n```\n\n---\n\n## 脚本说明\n\n### scripts/tts_simple.py ⭐ 推荐\n\n通用的文字转语音脚本，**自动输出 OGG/Opus 格式，适合飞书语音消息**。\n\n```bash\npython3 scripts/tts_simple.py \"要转换的文字\" [选项]\n```\n\n**参数**:\n\n| 参数 | 说明 |\n|------|------|\n| `text` | 要转换的文字，或 `.txt` 文件路径 |\n| `--output, -o` | 输出文件路径 |\n| `--engine, -e` | 引擎：`edge`（默认）或 `api` |\n| `--voice, -v` | 声音名称 |\n| `--rate, -r` | 语速，如 `+10%`、`-5%`（仅 edge） |\n| `--pitch, -p` | 音调，如 `+5Hz`、`-3Hz`（仅 edge） |\n| `--api-url` | API URL（api 模式） |\n| `--api-key` | API Key（api 模式） |\n| `--api-model` | API 模型（默认 `tts-1`） |\n\n### scripts/tts_edge.py\n\n纯粹的 edge-tts 脚本，**输出 MP3 格式**（不适合直接发送飞书语音）。\n\n```bash\n# 列出所有声音\npython3 scripts/tts_edge.py \"test"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn75k53tcdhqwka2fra5x817p9821zpb\",\n  \"slug\": \"tts-synthesizer\",\n  \"version\": \"1.0.9\",\n  \"publishedAt\": 1777474370848\n}"},{"path":"skill-card.md","content":"## Description:\n\nConverts text to speech using Microsoft edge-tts or an OpenAI-compatible TTS API, with support for OGG/Opus output for Feishu voice messages.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[moroiser](https://clawhub.ai/user/moroiser)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nDevelopers and agent operators use this skill to synthesize spoken audio from text, choose TTS voices, and generate Feishu-ready OGG/Opus files or general MP3 output.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: TTS input text may be sent to Microsoft edge-tts or to the configured OpenAI-compatible API endpoint.\n\nMitigation: Avoid sending secrets or private regulated data for synthesis, and install the skill only when the configured provider is acceptable for the intended data.\n\nRisk: API mode sends credentials and requests to the configured TTS endpoint.\n\nMitigation: Use a trusted HTTPS API URL and prefer environment variables over command-line API keys.\n\nRisk: Dependency changes could affect runtime behavior or provider communication.\n\nMitigation: Pin dependencies in a virtual environment before use when reproducibility or change control matters.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/moroiser/skills/tts-synthesizer)\n- [Publisher profile](https://clawhub.ai/user/moroiser)\n- [OpenAI-compatible API base URL example](https://api.openai.com/v1)\n\n## Skill Output:\n\n**Output Type(s):** [Guidance, Shell commands, Configuration, Files]\n\n**Output Format:** [Markdown guidance with bash commands and generated audio file paths]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Produces OGG/Opus audio for Feishu voice messages through tts_simple.py and MP3 audio through tts_edge.py.]\n\n## Skill Version(s):\n\n1.0.9 (source: server release metadata)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment."},{"path":"requirements.txt","content":"# Audio TTS Skill - Python Dependencies\n# Install: pip install -r requirements.txt\n#\n# ⚠️ System dependencies required (install separately):\n#   Ubuntu/Debian: sudo apt install ffmpeg libopus-tools\n#   macOS:         brew install ffmpeg\n#   Windows:       download ffmpeg and add to PATH\n\n# ── Core TTS ─────────────────────────────────────────────────────────────────\n# edge-tts: Microsoft Neural TTS (free, high quality, offline)\nedge-tts>=7.0.0\n\n# ── API Support ───────────────────────────────────────────────────────────────\n# For OpenAI-compatible API TTS\nopenai>=1.0.0\n\n# ── Audio Conversion ─────────────────────────────────────────────────────────\n# av (PyAV): audio/video conversion, required for OGG/Opus conversion\nav>=10.0.0\n\n# ── Core ─────────────────────────────────────────────────────────────────────\naiohttp>=3.8.0"}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":"文字转语音（Text-to-Speech / TTS）工具。 支持 edge-tts（微软神经网络 TTS，在线合成）和 OpenAI 兼容 API TTS。 触发词：语音回复、TTS、文字转语音、语音合成、语音对话。 适用平台：Linux / Windows / macOS。 Skill: TTS Synthesizer | TTS 合成器 Owner: moroiser Summary: 文字转语音（Text-to-Speech / TTS）工具。 支持 edge-tts（微软神经网络 TTS，在线合成）和 OpenAI 兼容 API TTS。 触发词：语音回复、TTS、文字转语音、语音合成、语音对话。 适用平台：Linux / Windows / macOS。 Tags: latest:1.0.9 Version history: v1.0.9 | 2026-04-29T14:52:50.848Z | user test v1.0.8 | 2026-04-29T14:08:54.737Z | user 1. Fix all internal path references and display names to match the renamed tts-synthesizer slug. 修复","editorialQuality":{"score":100,"threshold":65,"status":"ready","wordCount":1043,"uniquenessScore":52,"reasons":[]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-11T10:27:11.793Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-10-11T10:27:11.793Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-11T14:15:07.786Z","emptyReason":null},"items":[{"id":"8ebccd8e-3863-4187-8355-c3f14e1f9edf","entityType":"agent","canonicalPath":"/agent/iofficeai-aionui","slug":"iofficeai-aionui","name":"AionUi","description":"Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!","url":"https://github.com/iOfficeAI/AionUi","homepage":"https://www.aionui.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-10-09T19:11:12.944Z","createdAt":"2026-02-25T03:38:16.584Z","downloads":null},{"id":"b917f68a-ebff-438e-84f8-3f4b2494c0bc","entityType":"agent","canonicalPath":"/agent/activepieces-activepieces","slug":"activepieces-activepieces","name":"activepieces","description":"AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents","url":"https://github.com/activepieces/activepieces","homepage":"https://www.activepieces.com","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-15T02:22:12.426Z","createdAt":"2026-02-25T03:38:12.412Z","downloads":null},{"id":"5cb26759-3a39-483f-94cf-276a98c13bb8","entityType":"agent","canonicalPath":"/agent/cherryhq-cherry-studio","slug":"cherryhq-cherry-studio","name":"cherry-studio","description":"AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs","url":"https://github.com/CherryHQ/cherry-studio","homepage":"https://cherry-ai.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-11T14:38:40.986Z","createdAt":"2026-02-25T03:38:19.379Z","downloads":null},{"id":"6f6582d0-5d76-4f0f-b81d-86520247950b","entityType":"agent","canonicalPath":"/agent/copilotkit-copilotkit","slug":"copilotkit-copilotkit","name":"CopilotKit","description":"The Frontend for Agents & Generative UI. React + Angular","url":"https://github.com/CopilotKit/CopilotKit","homepage":"https://docs.copilotkit.ai","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-03-25T09:50:57.846Z","createdAt":"2026-02-25T03:39:14.617Z","downloads":null}],"links":{"hub":"/agent","source":"/agent/source/clawhub","protocols":[{"label":"OpenClaw","href":"/agent/protocol/openclew"}]}}}