text-to-speech
Skill694 starsChanged 3 months agoMITView on GitHub
文本转语音工具 - 默认 MiniMax TTS,支持切换 Edge TTS 和 Kokoro TTS (v1.1-zh)
- Reads credentials
- Installs packages
- Sends data out
21 other projects use a version of this.
Adopted by
Most recently taken up by
- OpenMontageInc/OpenMontagetheir own version, first seen Nov 8, 2026
- calesthio/OpenMontagetheir own version, first seen Nov 8, 2026
- dmccreary/ibook-skillstheir own version, first seen Nov 3, 2026
- MoizIbnYousaf/marketing-clitheir own version, first seen Nov 1, 2026
- eins78/agent-skillstheir own version, first seen Oct 30, 2026
- deepgram/skillstheir own version, first seen Oct 25, 2026
Used with
Projects with it also use speech-engine, voice-isolator and 9 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
RobStrayerSkillspeech-engine
Add real-time voice conversations to a custom agent runtime with ElevenLabs Speech Engine. Use when building Speech Engine servers, WebSocket handlers, WebRTC browser clients, conversation token endpoints, interruption-aware streaming responses, or voice-enabled chat agents that connect developer-owned server logic to ElevenLabs speech-to-text and text-to-speech.
Also in 3 projects that use this
RobStrayerSkillvoice-isolator
Remove background noise and isolate vocals/speech from audio using ElevenLabs Voice Isolator (audio isolation) API. Use when cleaning up noisy recordings, removing music or background ambience from dialogue, isolating speech from field recordings, preparing audio for transcription, extracting vocals, or any "denoise / clean up / isolate voice" task.
Also in 3 projects that use this
perso-aiSkilldubbing
Auto-dub (voice-translate) videos into other languages, with lip-sync (Perso AI Dubbing).
Also in 4 projects that use this
LinHao-citySkillsetup-api-key
Guides users through setting up an ElevenLabs API key for ElevenLabs MCP tools. Use when the user needs to configure an ElevenLabs API key, when ElevenLabs tools fail due to missing API key, or when the user mentions needing access to ElevenLabs. First checks whether ELEVENLABS_API_KEY is already configured and valid, and only runs full setup when needed.
Also in 5 projects that use this
LinHao-citySkillbfl-api
BFL FLUX API integration guide covering endpoints, async polling patterns, rate limiting, error handling, webhooks, and regional endpoints with Python and TypeScript code examples.
Also in 3 projects that use this
MoizIbnYousafSkillvisual-style
Build a persistent visual brand identity for image generation. Defines how the brand looks visually — aesthetic, lighting, composition, mood — and writes it to brand/creative-kit.md so /image-gen and other creative skills produce consistent on-brand visuals. Three modes: Extract (from website/URL), Build (interview), Reference (mood board/examples). Use when starting any project that needs images, when the user says "visual style", "brand aesthetic", "image style", "visual identity", "how should our images look", "build visual brand", "define our look", or when /image-gen outputs feel generic because no visual style exists yet.
Also in 4 projects that use this
- +5 more from LinHao-city
Other versions21 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 21
- calesthio/OpenMontage★ 78ksame name
- OpenMontageInc/OpenMontage★ 78ksame name
- elevenlabs/skills★ 539same name
- tadaspetra/loop★ 296same name
- dmccreary/claude-skills★ 110same name
- dmccreary/ibook-skills★ 110same name
- sarvamai/skills★ 72same name
- awesome-genmedia/skills★ 36same name
- MoizIbnYousaf/marketing-cli★ 33same name
- deepgram/skills★ 26same name
11 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository14 other files it gives its agents.
- audiocut-keywordSkill
- code-roasterSkill
- image-generatorSkill
- quark-mswnlz-publisherSkill
- youtube-downloaderSkill
- video-voice-changerSkill
- voice-changerSkill
- vps-security-hardeningSkill
- wespy-fetcherSkill
- wlzh-invoice-scannerSkill
- wlzh-youtube-trackerSkill
- x-fetcherSkill
- youtube-publisherSkill
- youtube-to-blog-postSkill
The file
Files
Text-to-Speech Skill
将文本转换为语音。默认使用 MiniMax TTS(在线高质量中文配音),并保留 Kokoro TTS v1.1-zh(本地 Docker,102 个中文音色)和 Edge TTS(在线)作为可配置后备。
引擎对比
| 特性 | MiniMax TTS | Kokoro TTS v1.1-zh | Edge TTS |
| 质量 | 默认推荐,中文短视频旁白更自然 | 本地可用、接近真人 | 标准 Neural 语音 |
| 网络 | 需要 MiniMax API | 不需要(本地 Docker) | 需要网络连接 |
| 默认音色 | Chinese (Mandarin)_Reliable_Executive(可靠高管) | zm_009 | zh-CN-YunyangNeural |
| 语速调节 | speed 参数,默认 1.0 | speed 参数 | rate/pitch/volume |
| 前提 | MINIMAX_API_KEY 环境变量 | Docker 容器需运行 | 安装 edge-tts |
| 配置值 | minimax | kokoro | edge |
使用说明
# 默认使用 MiniMax TTS(当前配置)
python3 ~/.claude/skills/text-to-speech/scripts/text_to_speech.py <文本文件>
# 指定引擎
python3 ~/.claude/skills/text-to-speech/scripts/text_to_speech.py script.txt --engine minimax
python3 ~/.claude/skills/text-to-speech/scripts/text_to_speech.py script.txt --engine kokoro
python3 ~/.claude/skills/text-to-speech/scripts/text_to_speech.py script.txt --engine edge
# 指定声音
python3 ~/.claude/skills/text-to-speech/scripts/text_to_speech.py script.txt -v zf_094
# 指定输出文件
python3 ~/.claude/skills/text-to-speech/scripts/text_to_speech.py script.txt -o output.mp3
# MiniMax 专属:同时保存经过校验的词级时间戳
python3 ~/.claude/skills/text-to-speech/scripts/text_to_speech.py script.txt \
-o output.mp3 --subtitle-output output.subtitles.json
# 调整语速(MiniMax/Kokoro)
python3 ~/.claude/skills/text-to-speech/scripts/text_to_speech.py script.txt --speed 1.2
# 列出所有可用声音
python3 ~/.claude/skills/text-to-speech/scripts/text_to_speech.py --list-voicesMiniMax TTS
默认配置:
- 引擎:
tts_engine = "minimax" - 模型:
speech-2.8-hd - 音色:
Chinese (Mandarin)_Reliable_Executive(可靠高管) - 语速:
1.0 - 输出:MP3
MiniMax 词级时间戳
--subtitle-output <path> 会为 MiniMax 请求启用词级时间戳,下载官方 sidecar 后校验文本、字符范围和时间单调性,再写入本地 JSON。sidecar 只保留 provider/model/voice/subtitle_type/segments,不会记录官方返回的短期签名 URL。该参数属于 MiniMax 专属能力;Edge/Kokoro 会失败关闭,避免下游误把估算时间当成官方时间戳。
整期表达一致性(默认)
minimax_tts.delivery_consistency 默认启用 friendly_tutorial。它用于面向普通大众的免费教程:像真人耐心讲解,允许正文自然使用“好、其实、这里呢、别急”等连接词,但不靠逐句变调制造表演感。同一期视频内所有句子固定使用相同的音色、速度、音量和音调,避免逐 beat 割裂。
- 默认档:
friendly_tutorial,speed1.0、volume1.0、pitch0 - 显式选择:
--delivery-profile friendly_tutorial - 保留档:
commercial_narration,仅用于公告、品牌声明等确需正式表达的内容 - 克隆音色选择顺序:
--voice>MINIMAX_VOICE_ID> 已激活的本机克隆档 > 仓库系统音色 - 本机档:
~/.config/duanku/minimax-voice.json,必须为0600,不提交仓库
MiniMax 专属语境适配(兼容回退)
minimax_tts.context_adaptation 只在 MiniMax 分支生效。Edge 和 Kokoro 不读取此配置,也不会改变原请求参数。
- 仅当
delivery_consistency关闭时,根据文本自动识别opening、summary、explanation、instruction、warning、resource、conclusion、call_to_action、neutral - 语境档只轻量调整 MiniMax 的语速、音量和音高,不修改原文、不注入 emotion、不自动插入声音标签
- 未命中规则时使用
explanation - 可用
--context warning等参数显式覆盖自动识别;选择 Edge/Kokoro 时该参数被忽略 - 调用方无需理解语境规则。视频流水线只需继续提交文本并使用返回音频,音频时长仍由下游实测
# 自动识别语境
python3 ~/.claude/skills/text-to-speech/scripts/text_to_speech.py script.txt
# MiniMax 显式指定风险提醒语境
python3 ~/.claude/skills/text-to-speech/scripts/text_to_speech.py script.txt --context warningMiniMax 声音克隆
声音克隆分为不收费的创建阶段和首次 TTS 激活阶段。首次使用新克隆音色合成会产生官方克隆费及试听字符费,脚本要求 quote ID 和精确金额确认,不能用布尔参数绕过。
引擎边界:克隆 profile、克隆 voice_id、--delivery-profile 和克隆样本门禁只允许在实际 tts_engine=minimax 时读取。切换到 Edge 或 Kokoro 后必须完全跳过这些配置,即使本机仍保留已激活的 MiniMax profile,也不得影响非 MiniMax 的音色、请求参数或预检结果。
# 样本检查,不联网、不收费
python3 scripts/minimax_voice_clone.py inspect --sample /path/to/source.m4a
# 输出激活报价,不联网、不收费
python3 scripts/minimax_voice_clone.py quote \
--voice-id DuankuNarrator20260801 \
--text "试听文案"
# 上传并创建克隆,不执行 TTS;必须确认拥有声音授权
python3 scripts/minimax_voice_clone.py clone \
--sample /path/to/source.m4a \
--voice-id DuankuNarrator20260801 \
--rights-confirmed
# 首次付费激活并生成试听,必须使用上一步 quote 的 ID 和金额
python3 scripts/minimax_voice_clone.py activate \
--text "试听文案" \
--output /path/to/preview.mp3 \
--confirm-quote-id '<quote_id>' \
--confirm-amount-usd '<estimated_total_usd>'样本要求:mp3/m4a/wav、10 秒至 5 分钟、最大 20 MB。克隆脚本默认请求 MiniMax 降噪和音量归一化。
密钥规则:
- API Key 只从环境变量读取,默认变量名
MINIMAX_API_KEY - 克隆
voice_id、远程 file ID 和激活记录只保存在本机0600profile - 不要把真实 Key 写进
config/tts_config.json、README、命令行参数或提交历史 - 如果要换变量名,只改
config/tts_config.json中的minimax_tts.api_key_env
export MINIMAX_API_KEY="你的本机 key"
python3 ~/.claude/skills/text-to-speech/scripts/text_to_speech.py script.txt -o output.mp3Kokoro TTS v1.1-zh 声音
使用 --list-voices 查看完整列表(102 个)。
推荐声音
zm_009- 男声(默认)zf_094- 女声(自然温柔)zf_001- 女声zm_050- 男声
英文声音
af_maple- 女声(Maple)af_sol- 女声(Sol)bf_vale- 男声(Vale)
声音命名规则
zf_XXX- 中文女声(55 个)zm_XXX- 中文男声(44 个)af_/bf_- 英文声音(3 个)
启动 Kokoro 服务
Kokoro TTS 需要 Docker 容器运行:
# 启动
cd /Users/m/document/QNSZ/project/kokoro-tts && ./start.sh
# 停止
cd /Users/m/document/QNSZ/project/kokoro-tts && ./stop.sh
# Web UI 试听
# http://localhost:8880/web/核心功能
1. 脚本解析
自动识别并移除播客脚本中的注释和标记:
- 时间戳:
(00:00) - BGM 注释:
[BGM渐入:...] - 舞台指示:
(主播声音:...)(停顿 1秒) - Markdown 标记:
**文本**
2. 中英文混合朗读
v1.1-zh 模型支持中英文混合文本的自然朗读。
3. 后处理集成
可选集成 voice-changer skill 进行变声处理。
配置文件
配置文件位于:~/.claude/skills/text-to-speech/config/tts_config.json
关键配置项:
tts_engine:"minimax"、"kokoro"或"edge"(默认引擎)minimax_tts: MiniMax 引擎配置(API URL、模型、默认音色、语速;Key 仅从环境变量读取)minimax_tts.context_adaptation: MiniMax 专属语境档和自动识别规则;不影响其他引擎kokoro_tts: Kokoro 引擎配置(API URL、默认声音、语速)edge_tts: Edge 引擎配置(声音、语速、音调、音量)available_voices: 按引擎分组的可用声音列表
工作流程
输入文本/文件
↓
脚本解析(移除注释和标记)
↓
MiniMax / Kokoro TTS / Edge TTS 语音合成
↓
后处理(voice-changer,可选)
↓
输出 MP3 文件代理绕过(重要)
Kokoro TTS 运行在 localhost:8880。如果系统配置了 HTTP 代理(http_proxy/https_proxy),请求 localhost 会被代理拦截导致连接失败(curl 返回 HTTP 000)。
规则:
- Python 脚本已内置
os.environ.setdefault("no_proxy", "localhost,127.0.0.1"),通过脚本调用无需额外处理 - 如果 AI 需要直接用
curl测试或调用 Kokoro API,必须加--noproxy localhost,127.0.0.1或设置no_proxy=localhost,127.0.0.1 - 如果 AI 直接写 Python
requests.post("http://localhost:8880/..."),必须设置proxies={"http": None, "https": None},或使用requests.Session(); session.trust_env = False,并设置NO_PROXY/no_proxy=localhost,127.0.0.1,::1 - 禁止不加代理绕过直接 curl/requests localhost;不要先走代理失败再重试,localhost Kokoro 请求默认就必须绕过代理
# 正确:绕过代理
curl --noproxy localhost,127.0.0.1 -X POST http://localhost:8880/v1/audio/speech ...
# 错误:走了代理,返回 HTTP 000
curl -X POST http://localhost:8880/v1/audio/speech ...依赖
- MiniMax TTS:
MINIMAX_API_KEY环境变量 - Kokoro TTS: Docker(容器运行在 localhost:8880)
- Edge TTS:
pip install edge-tts
性能参考
- Kokoro TTS: 1000字约 3-5 秒(本地 Docker CPU)
- Edge TTS: 1000字约 10-20 秒(受网络影响)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

