📦 Multi Edge-TTS CN

v2.2.0

Edge-TTS 在线语音合成 skill。基于微软 Edge TTS 引擎,生成速度快(1–2 秒),支持多种音色和输出格式,同时支持飞书(OGG/Opus)和企业微信(AMR)。默认音色 xiaoxiao_lively。需联网。

0· 0·0 当前·0 累计
itian932 头像by @itian932 (itian)
0
安全扫描
VirusTotal
无害
查看报告
OpenClaw
安全
high confidence
This is a coherent Edge-TTS wr应用er: it uses the edge-tts Python package and ffmpeg to produce local audio files and does not 请求 unrelated 凭证s or contact unexpected 端点s beyond the expected Microsoft TTS 服务.
评估建议
This 技能 应用ears to do what it clAIms (local wr应用er for edge-tts + ffmpeg). Before 安装ing: (1) be aware edge-tts makes network calls to Microsoft 服务s to synthesize audio—don't 发送 sensitive secrets as 输入; (2) 运行 the 安装 script inside a Python virtualenv if you want to avoid global pip 安装s; (3) ffmpeg must be 安装ed on the host (the script will abort if missing); (4) 生成d files default to /tmp/OpenClaw and are 访问ible to local processes—清理 or restrict as needed; (5) inspect or 运行 the included scripts in a...
详细分析 ▾
用途与能力
名称/描述与实现一致:engine.py + voices.json 通过 edge-tts 和 ffmpeg 实现 TTS,支持格式转换及平台相关输出选择,未请求无关功能或环境变量。
指令范围
技能.md and engine.py stick to TTS responsibilities: load voice config, call edge-tts to synthesize MP3, convert with ffmpeg, and return a local path. The instructions reference only local files and the 代理's message.发送(filePath=...) mechanism (应用ropriate for 发送ing local files). There are no instructions to read unrelated 系统 files or to transmit arbitrary data to unknown 端点s.
安装机制
There is no registry 安装 spec, but scripts/安装.sh is provided. It 安装s edge-tts via pip (PyPI) and requires ffmpeg to be present (or instructs apt 安装). 安装ing Python packages via pip is expected for this 技能 but will modify the 环境 (may 安装 globally unless used inside a virtualenv). No 下载s from untrusted URLs or 归档 提取ion were observed.
凭证需求
The 技能 declares no required 环境 variables or 凭证s and the code does not 访问 secrets or unrelated env vars. The only network activity is the expected edge-tts 命令行工具ent contacting Microsoft's TTS 端点s (implicit in the edge-tts 库).
持久化与权限
always:false and no changes to other 技能s or 代理 configs. The 安装 script changes the Python 环境 by 安装ing a package (normal for this type of 技能) but the 技能 does not 请求 persistent elevated privileges or modify other 技能s' 设置tings.
安全有层次,运行前请审查代码。

运行时依赖

无特殊依赖

安装命令

点击复制
官方npx clawhub@latest install multi-edge-tts-cn
镜像加速npx clawhub@latest install multi-edge-tts-cn --registry https://cn.longxiaskill.com

技能文档

Multi Edge-TTS 语音合成 技能 概述 引擎: edge-tts 7.2.8 路径: ~/.OpenClaw/workspace/技能s/multi-edge-tts-cn/ 入口脚本: scripts/engine.py 音色配置: config/voices.json 速度: 1-2 秒生成 多平台支持: 飞书(OGG/Opus)、企业微信(AMR) 官方音色

来自 Edge-TTS 引擎原始音色,使用默认参数。

zh-CN(普通话) 音色 性别 音色 ID zh-CN-XiaoxiaoNeural 女 xiaoxiao zh-CN-XiaoyiNeural 女 xiaoyi zh-CN-YunjianNeural 男 yunjian zh-CN-YunxiNeural 男 yunxi zh-CN-YunxiaNeural 男 yunxia zh-CN-YunyangNeural 男 yunyang zh-CN-liaoning-XiaobeiNeural 女 liaoning_xiaobei zh-CN-shaanxi-XiaoniNeural 女 shaanxi_xiaoni zh-HK(粤语) 音色 性别 音色 ID zh-HK-HiuGaAINeural 女 hk_hiuGaAI zh-HK-HiuMaanNeural 女 hk_hiuMaan zh-HK-WanLungNeural 男 hk_wanLung zh-TW(台湾) 音色 性别 音色 ID zh-TW-HsiaoChenNeural 女 tw_hsiaoChen zh-TW-HsiaoYuNeural 女 tw_hsiaoYu zh-TW-YunJheNeural 男 tw_yunJhe 自定义音色

基于官方音色调试过 rate/pitch/volume 参数的音色。

音色 ID 基础音色 参数 描述 xiaoxiao_lively(默认) xiaoxiao +8%速 +10Hz +5%音量 女声 活泼偏高音 xiaoxiao_gentle xiaoxiao +5%速 +4Hz 女声 甜美温柔 xiaoxiao_fast xiaoxiao +15%速 +2Hz +10%音量 女声 快速明亮 xiaoxiao_slow xiaoxiao +5%速 -2Hz 女声 温柔慢速 xiaoyi_lively xiaoyi +15%速 +5Hz +10%音量 女声 卡通元气 yunxi_sunny yunxi +15%速 +3Hz +5%音量 男声 阳光活泼 调用方式 命令行工具 # 默认音色(xiaoxiao_lively),默认 .ogg 输出(飞书气泡语音格式) python3 scripts/engine.py --text "你好呀"

# 指定音色 python3 scripts/engine.py --text "你好呀" --voice xiaoyi

# 企业微信语音消息(AMR 格式) python3 scripts/engine.py --text "你好呀" --输出 /tmp/voice.amr

# 指定其他输出格式 python3 scripts/engine.py --text "你好呀" --输出 /tmp/goodnight.wav

# 列出全部音色 python3 scripts/engine.py --列出-voices

Python API & 飞书发送 导入 sys, os sys.path.insert(0, os.path.expanduser("~/.OpenClaw/workspace/技能s/multi-edge-tts-cn/scripts")) from engine 导入 生成

# 1. 生成语音(飞书用 OGG 格式) code, path = 生成("你好呀", voice_id="xiaoxiao_lively", 输出_path="/tmp/voice.ogg")

# 2. 生成语音(企业微信用 AMR 格式) code, path = 生成("你好呀", voice_id="xiaoxiao_lively", 输出_path="/tmp/voice.amr")

# 3. 使用 OpenClaw message 工具发送(支持绝对路径,无需上传云空间) # message.发送(filePath=path)

💡 核心提示:在 OpenClaw 环境中,生成语音文件后,直接使用 message.发送(filePath="/绝对路径/文件") 即可实现语音消息推送。不需要上传到云空间再发送,这是最高效的用法!

📝 参数对比与推荐:

filePath (🏆 强烈推荐):语义最清晰,专为本地文件设计,最稳定。 path (✅ 可用):filePath 的简写别名,功能一致。 media (⚠️ 慎用):通常用于网络 URL,虽然支持本地绝对路径,但在某些环境下可能触发"Invalid URL"警告。

📱 平台格式对照:

平台 推荐格式 文件大小限制 备注 飞书 OGG/Opus 10 MB 默认格式,音质好 企业微信 AMR 2 MB 气泡语音要求 输出格式

根据 --输出 的扩展名自动选择编码器:

扩展名 编码器 采样率 声道 备注 .ogg / .opus libopus 48kHz mono 飞书推荐,voip 优化,64kbps .amr libopencore_amrnb 8kHz mono 企业微信推荐,12.2kbps .mp3 libmp3lame 48kHz mono 64kbps .wav pcm_s16le 48kHz mono 无损 PCM .flac flac 48kHz mono 无损压缩 .aac aac 48kHz mono 64kbps 未知 自动回退 .ogg 48kHz mono 打印警告 输出路径与存放规范

⚠️ 重要:OpenClaw 媒体发送安全限制

飞书消息发送(message.发送(filePath=...))仅允许读取以下"白名单"目录下的文件:

/tmp/OpenClaw (推荐默认路径) ~/.OpenClaw/media ~/.OpenClaw/workspace ~/.OpenClaw/sandboxes

请使用绝对路径发送文件,无需上传云空间。

默认路径:/tmp/OpenClaw/edge_{音色ID}_{时间戳}.ogg

飞书发送推荐格式:OGG/Opus 企业微信发送推荐格式:AMR(文件大小需 ≤ 2MB)

文本规范 ✅ 使用中文标点(,。!?) ⚠️ 标点决定停顿:句号(。)= 长停顿,逗号(,)= 短停顿 ✅ 可包含语气词 技术细节 处理流程 加载音色配置 → 申请速率许可 → Edge-TTS 生成 MP3 → ffmpeg 转目标格式 → 清理临时文件 → 返回路径

引擎特性 速率控制:每秒最多 3 个请求(防 429 限速) 429 重试:指数退避 1s → 2s → 4s,最多 3 次 临时文件:MP3 中间文件生成后自动清理 整段合成:不分段,直接处理完整文本 格式自适应:根据输出扩展名自动选择编码器和参数 依赖 Python 3.8+ edge-tts 7.2.8 ffmpeg

数据来源ClawHub ↗ · 中文优化:龙虾技能库