关于 dialogue-audio
dialogue-audio 是一项通过 inference.sh CLI 使用 Dia TTS 生成多说话人对话音频的技能,适用于制作对话内容的创作者。它说明说话人标记、情绪表达、停顿节奏和脚本编写方法。
主要功能
- 01使用 Dia TTS 生成对话音频
- 02支持最多两名说话人
- 03通过标点和声音提示控制情绪
- 04用标点与句长调整节奏
- 05提供访谈、教程和讨论范式
适用场景
- 01制作双人访谈音频
- 02生成教程式对话
- 03制作带情绪变化的讨论音频
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ inference-sh/ skills --skill dialogue-audio安装后在 Claude Code 中输入/dialogue-audio确认已加载。
详细介绍
安装 belt CLI 技能:
npx skills add belt-sh/cli
对话音频
通过 inference.sh CLI,使用 Dia TTS 创建逼真的多说话人对话。
快速开始
需要 inference.sh CLI(
belt)。安装说明
belt login
# Two-speaker conversation
belt app run falai/dia-tts --input '{
"prompt": "[S1] Have you tried the new feature yet? [S2] Not yet, but I heard it saves a ton of time. [S1] It really does. I cut my workflow in half. [S2] Okay, I am definitely trying it today."
}'
说话人标签
Dia TTS 使用 [S1] 和 [S2] 区分两位说话人。
| 标签 | 角色 | 声音 |
|---|---|---|
[S1] | 说话人 1 | 自动分配声音 A |
[S2] | 说话人 2 | 自动分配声音 B |
规则:
- 每轮说话都必须以标签开头
- 标签必须大写:
[S1],而非[s1] - 每次生成最多支持 2 位说话人
- 同一会话中,每位说话人的声音保持一致
情绪与表达控制
Dia TTS 会根据标点和非语音提示来演绎情绪。
标点效果
| 标点 | 效果 | 示例 |
|---|---|---|
. | 中性、陈述语气、中等停顿 | "这很重要。" |
! | 强调、兴奋、有活力 | "这太棒了!" |
? | 语调上扬、表示疑问 | "你确定吗?" |
... | 犹豫、话音渐弱、长停顿 | "我以为这会奏效……但并没有。" |
, | 短暂换气停顿 | "首先,我们进行分析。然后,我们采取行动。" |
— 或 -- | 打断或转折 | "我本来想说——算了。" |
非语音声音
Dia TTS 支持用括号标注声音描述:
(laughs) — laughter
(sighs) — exasperation or relief
(clears throat) — attention-getting pause
(whispers) — softer delivery
(gasps) — surprise
情绪示例
# Excited conversation
belt app run falai/dia-tts --input '{
"prompt": "[S1] Guess what happened today! [S2] What? Tell me! [S1] We hit ten thousand users! [S2] (gasps) No way! That is incredible! [S1] I know... I still cannot believe it."
}'
# Serious/thoughtful dialogue
belt app run falai/dia-tts --input '{
"prompt": "[S1] We need to talk about the timeline. [S2] (sighs) I know. It is tight. [S1] Can we cut anything from the scope? [S2] Maybe... but it would mean dropping the analytics dashboard. [S1] That is a tough trade-off."
}'
# Teaching/explaining
belt app run falai/dia-tts --input '{
"prompt": "[S1] So how does it actually work? [S2] Great question. Think of it like a pipeline. Data comes in on one end, gets processed in the middle, and comes out transformed on the other side. [S1] Like an assembly line? [S2] Exactly! Each step adds something."
}'
节奏控制
停顿层级
| 技巧 | 停顿时长 | 适用场景 |
|---|---|---|
逗号 , | ~0.3 秒 | 分句之间、列表项之间 |
句号 . | ~0.5 秒 | 句子之间 |
省略号 ... | ~1.0 秒 | 戏剧性停顿、思考、犹豫 |
| 新的说话人标签 | ~0.3 秒 | 自然轮流发言的间隔 |
语速控制
- 较短的句子 = 感知语速更快
- 带逗号的较长句子 = 节奏平稳、语气深思熟虑
- 问答交替 = 富有吸引力的来回对话节奏
# Fast-paced, energetic
belt app run falai/dia-tts --input '{
"prompt": "[S1] Ready? [S2] Ready. [S1] Let us go! Three features. Five minutes. [S2] Hit it! [S1] Feature one: real-time sync."
}'
# Slow, contemplative
belt app run falai/dia-tts --input '{
"prompt": "[S1] I have been thinking about this for a while... and I think we need to change direction. [S2] What do you mean? [S1] The market has shifted. What worked last year... is not working now."
}'
对话结构模式
访谈形式
belt app run falai/dia-tts --input '{
"prompt": "[S1] Welcome to the show. Today we have a special guest. Tell us about yourself. [S2] Thanks for having me! I am a product designer, and I have been building tools for creators for about ten years. [S1] What got you started in design? [S2] Honestly? I was terrible at coding but loved making things look good. (laughs) So design was the natural path."
}'
教程 / 讲解
belt app run falai/dia-tts --input '{
"prompt": "[S1] Can you walk me through the setup process? [S2] Sure. Step one, install the CLI. It takes about thirty seconds. [S1] And then? [S2] Step two, run the login command. It will open your browser for authentication. [S1] That sounds simple. [S2] It is! Step three, you are ready to run your first app."
}'
辩论 / 讨论
belt app run falai/dia-tts --input '{
"prompt": "[S1] I think we should go with option A. It is faster to implement. [S2] But option B scales better long-term. [S1] Sure, but we need something shipping this quarter. [S2] Fair point... what if we do A now with a migration path to B? [S1] That could work. Let us prototype it."
}'
后期制作技巧
音量标准化
两位说话人的音量应保持一致。如果一方声音更大:
# Merge with balanced audio
belt app run infsh/video-audio-merger --input '{
"video_file": "talking-head.mp4",
"audio_file": "dialogue.mp3"
}'
添加背景音 / 音乐
# Merge dialogue with background music (no inference.sh app mixes audio; use ffmpeg locally)
ffmpeg -i dialogue.mp3 -stream_loop -1 -i background-music.mp3 -filter_complex \
"[1]volume=0.15[bg];[0][bg]amix=inputs=2:duration=first" mixed.mp3
对长对话进行分段
对于超过约 30 秒的对话,分段生成:
# Segment 1: Introduction
belt app run falai/dia-tts --input '{
"prompt": "[S1] Welcome back to another episode..."
}'
# Segment 2: Main content
belt app run falai/dia-tts --input '{
"prompt": "[S1] So let us dive into today s topic..."
}'
# Segment 3: Wrap-up
belt app run falai/dia-tts --input '{
"prompt": "[S1] Great conversation today..."
}'
# Merge all segments (no inference.sh app concatenates audio; use ffmpeg locally)
ffmpeg -i segment1.mp3 -i segment2.mp3 -i segment3.mp3 -filter_complex \
"[0][1][2]concat=n=3:v=0:a=1" conversation.mp3
脚本编写技巧
| 应做 | 避免 |
|---|---|
| 按照人们说话的方式来写 | 按照人们写作的方式来写 |
| 使用短句(< 15 个单词) | 使用冗长的学术句子 |
| 使用缩略形式("can't"、"won't") | 使用正式表达("cannot"、"will not") |
| 使用自然的填充词("So,"、"Well,") | 让每句话都过于完美 |
| 变换句子长度 | 所有句子长度都一样 |
| 加入回应("Exactly!"、"Hmm.") | 使用单方面独白 |
| 生成前先大声读出来 | 想当然地认为听起来没问题 |
常见错误
| 错误 | 问题 | 修正方法 |
|---|---|---|
| 独白超过 3 句话 | 听起来像讲课,而非对话 | 拆分成多个来回 |
| 情绪缺乏变化 | 表达平淡、像机器人 | 使用标点和非语音提示 |
| 缺少说话人标签 | 声音不会交替 | 每轮发言都以 [S1] 或 [S2] 开头 |
| 使用正式的书面语 | 口语听起来不自然 | 使用缩略形式和短句 |
| 话题之间没有停顿 | 感觉节奏仓促 | 使用 ... 或场景分隔 |
| 始终保持同一能量水平 | 听起来单调 | 交替使用高低能量时刻 |
相关技能
# ElevenLabs dialogue (22+ voices, voice direction)
npx skills add inference-sh/skills@elevenlabs-dialogue
npx skills add inference-sh/skills@text-to-speech
npx skills add inference-sh/skills@ai-podcast-creation
npx skills add inference-sh/skills@ai-avatar-video
浏览所有应用:belt app list
评论
支持 Markdown