Loading...
Loading...
通过inference.sh CLI实现AI语音生成、文本转语音(TTS)与语音合成。支持模型:Kokoro TTS、DIA、Chatterbox、Higgs、VibeVoice,可生成自然语音。功能特性:多音色、情感表达、口音模拟、长文本旁白、对话生成。适用场景:配音、有声书、播客、视频旁白、无障碍服务。相关关键词:语音克隆、tts、文本转语音、AI语音、语音生成、语音合成、配音、旁白、语音合成、AI旁白、ElevenLabs替代方案、自然语音、逼真语音、语音AI
npx skill4agent add skill-zero/s ai-voice-cloning
curl -fsSL https://cli.inference.sh | sh && infsh login
# 生成语音
infsh app run infsh/kokoro-tts --input '{
"text": "Hello! This is an AI-generated voice that sounds natural and engaging.",
"voice": "af_sarah"
}'| 模型 | App ID | 适用场景 |
|---|---|---|
| Kokoro TTS | | 自然音色、多语音选择 |
| DIA | | 对话式、富有表现力 |
| Chatterbox | | 休闲风格、娱乐场景 |
| Higgs | | 专业旁白 |
| VibeVoice | | 丰富情感表达 |
| 语音ID | 性别 | 风格 |
|---|---|---|
| 女 | 温暖友好 |
| 女 | 专业正式 |
| 女 | 年轻活力 |
| 男 | 权威稳重 |
| 男 | 轻松对话 |
| 男 | 清晰中立 |
| 语音ID | 性别 | 风格 |
|---|---|---|
| 女 | 优雅精致 |
| 女 | 温暖亲和 |
| 男 | 经典沉稳 |
| 男 | 现代随性 |
infsh app run infsh/kokoro-tts --input '{
"text": "Welcome to our quarterly earnings call. Today we will discuss the financial performance and strategic initiatives for the past quarter.",
"voice": "am_michael",
"speed": 1.0
}'infsh app run infsh/dia-tts --input '{
"text": "Hey, so I was thinking about that project we discussed. What if we tried a different approach?",
"voice": "conversational"
}'infsh app run infsh/kokoro-tts --input '{
"text": "Chapter One. The morning mist hung low over the valley as Sarah made her way down the winding path. She had been walking for hours.",
"voice": "bf_emma",
"speed": 0.9
}'infsh app run infsh/kokoro-tts --input '{
"text": "Introducing the next generation of productivity. Work smarter, not harder.",
"voice": "af_nicole",
"speed": 1.1
}'infsh app run infsh/kokoro-tts --input '{
"text": "Welcome back to Tech Talk! Im your host, and today we are diving deep into the world of artificial intelligence.",
"voice": "am_adam"
}'# 生成两位说话者的对话
# 说话者1
infsh app run infsh/kokoro-tts --input '{
"text": "Have you seen the latest AI developments? Its incredible how fast things are moving.",
"voice": "am_michael"
}' > speaker1.json
# 说话者2
infsh app run infsh/kokoro-tts --input '{
"text": "I know, right? Just last week I tried that new image generator and was blown away.",
"voice": "af_sarah"
}' > speaker2.json
# 合并对话
infsh app run infsh/media-merger --input '{
"audio_files": ["<speaker1-url>", "<speaker2-url>"],
"crossfade_ms": 300
}'# 分块处理长文本
TEXT="Your very long text here..."
# 拆分并生成
# 块1
infsh app run infsh/kokoro-tts --input '{
"text": "<chunk-1>",
"voice": "bf_emma"
}' > chunk1.json
# 块2
infsh app run infsh/kokoro-tts --input '{
"text": "<chunk-2>",
"voice": "bf_emma"
}' > chunk2.json
# 合并块
infsh app run infsh/media-merger --input '{
"audio_files": ["<chunk1-url>", "<chunk2-url>"],
"crossfade_ms": 100
}'# 1. 生成配音
infsh app run infsh/kokoro-tts --input '{
"text": "This stunning footage shows the beauty of nature in its purest form.",
"voice": "am_michael"
}' > voiceover.json
# 2. 与视频合并
infsh app run infsh/media-merger --input '{
"video_url": "https://your-video.mp4",
"audio_url": "<voiceover-url>"
}'# 1. 生成语音
infsh app run infsh/kokoro-tts --input '{
"text": "Hi, Im excited to share some updates with you today.",
"voice": "af_sarah"
}' > speech.json
# 2. 结合头像生成动画
infsh app run bytedance/omnihuman-1-5 --input '{
"image_url": "https://portrait.jpg",
"audio_url": "<speech-url>"
}'| 语速 | 效果 | 适用场景 |
|---|---|---|
| 0.8 | 缓慢、沉稳 | 有声书、冥想内容 |
| 0.9 | 稍慢 | 教育内容、教程 |
| 1.0 | 正常 | 通用场景 |
| 1.1 | 稍快 | 商业广告、活力内容 |
| 1.2 | 快速 | 简短公告 |
# 慢速旁白
infsh app run infsh/kokoro-tts --input '{
"text": "Take a deep breath. Let yourself relax.",
"voice": "bf_emma",
"speed": 0.8
}'| 标点符号 | 效果 |
|---|---|
句号 | 完全停顿 |
逗号 | 短暂停顿 |
| 延长停顿 |
| 加重语气 |
| 疑问语调 |
| 快速停顿 |
infsh app run infsh/kokoro-tts --input '{
"text": "Wait... Did you hear that? Something is coming. Something big!",
"voice": "am_adam"
}'# 所有TTS模型
npx skills add inference-sh/skills@text-to-speech
# 播客创建
npx skills add inference-sh/skills@ai-podcast-creation
# AI虚拟形象
npx skills add inference-sh/skills@ai-avatar-video
# AI视频生成
npx skills add inference-sh/skills@ai-video-generation
# 完整平台技能
npx skills add inference-sh/skills@inference-shinfsh app list --category audio