mcpField
A
ai-voice-cloning

ai-voice-cloning

github.com/qu-skills创意与媒体443 次安装12 周前更新
代码仓库

关于 ai-voice-cloning

ai-voice-cloning 是通过 belt 命令行调用多种文本转语音模型生成语音的技能,适用于音频内容创作者。它支持选择音色、调整语速和控制情绪表达,并涵盖旁白、对话和视频配音工作流。

主要功能

  1. 01通过 belt 调用多种 TTS 模型
  2. 02选择音色并调整语速
  3. 03控制 Inworld TTS 的情绪与表达方式
  4. 04生成多音色对话
  5. 05分段处理长文本
  6. 06将生成语音用于视频工作流

适用场景

  1. 01制作视频旁白和广告配音
  2. 02朗读有声书与学习材料
  3. 03生成播客主持人语音或对话
  4. 04制作无障碍或 IVR 语音内容

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/qu-skills/superpowers --skill ai-voice-cloning

安装后在 Claude Code 中输入/ai-voice-cloning确认已加载。

详细介绍

安装 belt CLI 技能: npx skills add belt-sh/cli

AI 语音生成

通过 inference.sh CLI 生成自然的 AI 语音。

AI 语音生成

快速开始

需要 inference.sh CLI(belt)。安装说明

belt login

# Generate speech
belt app run infsh/kokoro-tts --input '{
  "prompt": "Hello! This is an AI-generated voice that sounds natural and engaging.",
  "voice": "af_sarah"
}'

可用模型

模型应用 ID最适合
Inworld TTS-2inworld/text-to-speech-2100 多种语言、情绪/非语言引导、表达模式
Inworld TTS 1.5 Maxinworld/text-to-speech-1-5-max低延迟(<200ms)、15 种语言
Inworld TTS 1.5 Miniinworld/text-to-speech-1-5-mini超低延迟(约 120ms)、15 种语言、实时处理
ElevenLabs TTSelevenlabs/tts优质音质、22 种以上声音、32 种语言
ElevenLabs Voice Changerelevenlabs/voice-changer转换现有语音录音
Kokoro TTSinfsh/kokoro-tts自然、多种声音
DIAinfsh/dia-tts对话式、富有表现力
Chatterboxinfsh/chatterbox轻松随意、娱乐用途
Higgsinfsh/higgs-tts专业旁白
VibeVoiceinfsh/vibevoice丰富的情感表达

Kokoro 声音库

美式英语
声音 ID性别风格
af_sarah女温暖、友好
af_nicole女专业
af_sky女青春
am_michael男权威
am_adam男对话式
am_echo男清晰、中性
英式英语
声音 ID性别风格
bf_emma女优雅
bf_isabella女温暖
bm_george男经典
bm_lewis男现代

Inworld TTS — 角色与情绪声音

Inworld TTS-2 专为角色配音、游戏和富有表现力的语音而打造。可在文本中使用 [brackets] 控制情绪、非语言表达和语音风格:

# Expressive character voice with emotion steering
belt app run inworld/text-to-speech-2 --input '{
  "text": "[excited] Oh wow, you actually found the ancient artifact! [gasp] I cannot believe it... [whisper] We need to keep this between us.",
  "voice_id": "Sarah",
  "delivery_mode": "CREATIVE"
}'

# Calm narrator with stable delivery
belt app run inworld/text-to-speech-2 --input '{
  "text": "The sun set behind the mountains, casting long shadows across the valley. A new chapter was about to begin.",
  "voice_id": "Sarah",
  "delivery_mode": "STABLE"
}'

表达模式: STABLE(稳定一致,适合旁白)、BALANCED(自然,默认)、CREATIVE(富有表现力,适合角色)

引导示例: [laugh]、[sigh]、[whisper]、[excited]、[sad]、[angry]、[pause]、[gasp]

内置声音(涵盖 15 种语言,271 种以上):Sarah、Alex、Ashley、Dennis、Hana、Blake、Luna、Clive 等。前往 Inworld TTS Playground 查看全部声音。

面向实时/对话式 AI 的低延迟方案
# Ultra-fast response for chatbots & game NPCs (~120ms)
belt app run inworld/text-to-speech-1-5-mini --input '{
  "text": "Welcome, traveler. What brings you to our village?",
  "voice_id": "Clive",
  "speaking_rate": 0.9
}'

语音生成示例

专业旁白
belt app run infsh/kokoro-tts --input '{
  "prompt": "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
}'
对话风格
belt 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"
}'
有声书旁白
belt app run infsh/kokoro-tts --input '{
  "prompt": "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
}'
视频配音
belt app run infsh/kokoro-tts --input '{
  "prompt": "Introducing the next generation of productivity. Work smarter, not harder.",
  "voice": "af_nicole",
  "speed": 1.1
}'
播客主持人
belt app run infsh/kokoro-tts --input '{
  "prompt": "Welcome back to Tech Talk! Im your host, and today we are diving deep into the world of artificial intelligence.",
  "voice": "am_adam"
}'

多人语音对话

# Generate dialogue between two speakers
# Speaker 1
belt app run infsh/kokoro-tts --input '{
  "prompt": "Have you seen the latest AI developments? Its incredible how fast things are moving.",
  "voice": "am_michael"
}' > speaker1.json

# Speaker 2
belt app run infsh/kokoro-tts --input '{
  "prompt": "I know, right? Just last week I tried that new image generator and was blown away.",
  "voice": "af_sarah"
}' > speaker2.json

# Merge conversation
belt app run infsh/media-merger --input '{
  "audio_files": ["<speaker1-url>", "<speaker2-url>"],
  "crossfade_ms": 300
}'

长篇内容

分块处理

对于超过 5000 个字符的内容,请拆分成多个块:

# Process long text in chunks
TEXT="Your very long text here..."

# Split and generate
# Chunk 1
belt app run infsh/kokoro-tts --input '{
  "prompt": "<chunk-1>",
  "voice": "bf_emma"
}' > chunk1.json

# Chunk 2
belt app run infsh/kokoro-tts --input '{
  "prompt": "<chunk-2>",
  "voice": "bf_emma"
}' > chunk2.json

# Merge chunks
belt app run infsh/media-merger --input '{
  "audio_files": ["<chunk1-url>", "<chunk2-url>"],
  "crossfade_ms": 100
}'

语音与视频工作流

为视频添加配音
# 1. Generate voiceover
belt app run infsh/kokoro-tts --input '{
  "prompt": "This stunning footage shows the beauty of nature in its purest form.",
  "voice": "am_michael"
}' > voiceover.json

# 2. Merge with video
belt app run infsh/media-merger --input '{
  "video_url": "https://your-video.mp4",
  "audio_url": "<voiceover-url>"
}'
创建口播视频
# 1. Generate speech
belt app run infsh/kokoro-tts --input '{
  "prompt": "Hi, Im excited to share some updates with you today.",
  "voice": "af_sarah"
}' > speech.json

# 2. Animate with avatar
belt 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快快速通知
# Slow narration
belt app run infsh/kokoro-tts --input '{
  "prompt": "Take a deep breath. Let yourself relax.",
  "voice": "bf_emma",
  "speed": 0.8
}'

使用标点控制节奏

使用标点来控制语音节奏:

标点效果
句号 .完整停顿
逗号 ,短暂停顿
...延长停顿
!强调
?疑问语调
-快速停顿
belt app run infsh/kokoro-tts --input '{
  "prompt": "Wait... Did you hear that? Something is coming. Something big!",
  "voice": "am_adam"
}'

最佳实践

  1. 让语气与内容相符 - 商务内容使用专业语气,社交内容使用轻松语气
  2. 使用标点符号 - 用句号和逗号控制语速
  3. 保持句子简短 - 更容易生成,听起来也更自然
  4. 测试不同的声音 - 同一段文本在不同声音下听起来会不一样
  5. 调整语速 - 稍微放慢通常听起来更自然
  6. 拆分较长内容 - 分段处理以保持一致性

使用场景

  • 配音 - 视频旁白、商业广告
  • 有声书 - 全书朗读
  • 播客 - AI 主持人和嘉宾
  • 在线学习 - 课程旁白
  • 无障碍访问 - 屏幕阅读器内容
  • IVR - 电话系统消息
  • 内容本地化 - 翻译并配音

相关技能

# ElevenLabs TTS (premium, 22+ voices)
npx skills add inference-sh/skills@elevenlabs-tts

# ElevenLabs voice changer (transform recordings)
npx skills add inference-sh/skills@elevenlabs-voice-changer

# All TTS models
npx skills add inference-sh/skills@text-to-speech

# Podcast creation
npx skills add inference-sh/skills@ai-podcast-creation

# AI avatars
npx skills add inference-sh/skills@ai-avatar-video

# Video generation
npx skills add inference-sh/skills@ai-video-generation

# Full platform skill
npx skills add inference-sh/skills@infsh-cli

浏览音频应用:belt app list --category audio

评论

支持 Markdown