关于 text-to-speech
这是一个通过 inference.sh 音频应用将文本转为语音的 belt CLI 技能,面向需要生成旁白、对话语音或长篇音频的场景,并列出多种模型及其用途。
主要功能
- 01通过 belt 运行文本转语音应用
- 02列出多种语音模型
- 03支持情绪与表达方式控制
- 04提供低延迟模型选项
适用场景
- 01制作产品演示旁白
- 02根据脚本生成播客音频
- 03制作富有表现力的角色对白
- 04为视频添加语音旁白
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ magentosh/ superpowers --skill text-to-speech安装后在 Claude Code 中输入/text-to-speech确认已加载。
详细介绍
安装 belt CLI skill:
npx skills add belt-sh/cli
文本转语音
通过 inference.sh CLI 将文本转换为自然语音。

快速开始
需要 inference.sh CLI(
belt)。安装说明
belt login
# Generate speech
belt app run infsh/kokoro-tts --input '{"text": "Hello, welcome to our product demo."}'
可用模型
| 模型 | App ID | 最适用于 |
|---|---|---|
| Inworld TTS-2 | inworld/text-to-speech-2 | 100 多种语言、通过 [方括号] 调节情绪、多种表达模式 |
| Inworld TTS 1.5 Max | inworld/text-to-speech-1-5-max | 低延迟(<200ms)、15 种语言 |
| Inworld TTS 1.5 Mini | inworld/text-to-speech-1-5-mini | 超低延迟(约 120ms)、15 种语言 |
| ElevenLabs TTS | elevenlabs/tts | 卓越品质、22 种以上音色、32 种语言 |
| DIA TTS | infsh/dia-tts | 对话式、富有表现力 |
| Kokoro TTS | infsh/kokoro-tts | 快速、自然 |
| Chatterbox | infsh/chatterbox | 通用 |
| Higgs Audio | infsh/higgs-audio | 情绪控制 |
| VibeVoice | infsh/vibevoice | 播客、长篇内容 |
浏览所有音频应用
belt app list --category audio
示例
基本文本转语音
belt app run infsh/kokoro-tts --input '{"text": "Welcome to our tutorial."}'
Inworld TTS-2 — 情绪调节
Inworld TTS-2 支持使用 [方括号] 通过自然语言进行调节——可在文本中直接控制情绪、音量、语速和非语言声音:
belt app run inworld/text-to-speech-2 --input '{
"text": "I have some [exciting] news to share with you! [pause] We just hit one million users. [laugh]",
"voice_id": "Sarah",
"delivery_mode": "CREATIVE"
}'
表达模式:STABLE(一致)、BALANCED(自然,默认)、CREATIVE(富有表现力)。
内置音色(15 种语言,共 271 种以上):Sarah、Alex、Ashley、Dennis、Hana、Blake、Luna、Clive 等。可在 Inworld TTS Playground 中浏览所有音色,或通过 GET https://api.inworld.ai/voices/v1/voices 以编程方式列出。
Inworld TTS 1.5 — 低延迟
适用于速度至关重要的实时应用:
# Max quality at low latency (<200ms)
belt app run inworld/text-to-speech-1-5-max --input '{
"text": "Welcome back! How can I help you today?",
"voice_id": "Ashley"
}'
# Ultra-low latency (~120ms) for conversational AI
belt app run inworld/text-to-speech-1-5-mini --input '{
"text": "Sure, let me look that up for you.",
"voice_id": "Dennis"
}'
使用 DIA 生成对话式语音
belt app sample infsh/dia-tts --save input.json
# Edit input.json:
# {
# "text": "Hey! How are you doing today? I'm really excited to share this with you.",
# "voice": "conversational"
# }
belt app run infsh/dia-tts --input input.json
长篇音频(播客)
belt app sample infsh/vibevoice --save input.json
# Edit input.json with your podcast script
belt app run infsh/vibevoice --input input.json
使用 Higgs 生成富有表现力的语音
belt app sample infsh/higgs-audio --save input.json
# {
# "text": "This is absolutely incredible!",
# "emotion": "excited"
# }
belt app run infsh/higgs-audio --input input.json
使用场景
- 配音:产品演示、说明视频
- 有声读物:将文本转换为语音
- 播客:生成播客节目
- 无障碍访问:让内容更易于访问
- IVR:电话系统语音提示
- 视频旁白:为视频添加旁白
- 游戏 / NPC:通过情绪调节生成角色语音(Inworld TTS-2)
- 对话式 AI:生成超低延迟响应(Inworld TTS 1.5 Mini)
- 虚拟形象 / UGC 视频:为说话人头部虚拟形象生成语音
与视频结合使用
创建真人头像视频最简单的方式是使用内置 TTS 的 P-Video-Avatar——无需单独处理音频:
belt app run pruna/p-video-avatar --input '{
"image": "https://portrait.jpg",
"voice_script": "Your script here",
"voice": "Zephyr (Female)"
}'
对于不带内置 TTS 的模型(OmniHuman、PixVerse),请先生成语音:
# 1. Generate speech with Inworld TTS-2 (emotion steering)
belt app run inworld/text-to-speech-2 --input '{
"text": "[friendly] Your script here. [excited] This is the best part!",
"voice_id": "Sarah",
"delivery_mode": "CREATIVE"
}' > speech.json
# 2. Use the audio URL with OmniHuman for avatar video
belt app run bytedance/omnihuman-1-5 --input '{
"image_url": "https://portrait.jpg",
"audio_url": "<audio-url-from-step-1>"
}'
相关技能
# ElevenLabs TTS (premium, 22+ voices)
npx skills add inference-sh/skills@elevenlabs-tts
# ElevenLabs dialogue (multi-speaker)
npx skills add inference-sh/skills@elevenlabs-dialogue
# Full platform skill (all apps)
npx skills add inference-sh/skills@infsh-cli
# AI avatars (combine TTS with talking heads)
npx skills add inference-sh/skills@ai-avatar-video
# AI music generation
npx skills add inference-sh/skills@ai-music-generation
# Speech-to-text (transcription)
npx skills add inference-sh/skills@speech-to-text
# Video generation
npx skills add inference-sh/skills@ai-video-generation
浏览所有应用:belt app list
文档
评论
支持 Markdown