mcpField
D
dialogue-audio

dialogue-audio

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

关于 dialogue-audio

dialogue-audio 指导创作者通过 inference.sh 命令行,使用 Dia TTS 生成多说话人对话音频,涵盖说话人标签、情绪表达、节奏控制和对话结构。

主要功能

  1. 01生成最多两位说话人的对话
  2. 02通过说话人标签分配声音
  3. 03用标点和声音提示控制情绪
  4. 04通过停顿和句长调整节奏
  5. 05访谈、教程和辩论范例

适用场景

  1. 01制作对话式播客片段
  2. 02生成访谈或教程音轨
  3. 03为音频内容生成富有表现力的对话

安装

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

$npx skills add https://github.com/qu-skills/superpowers --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": "talking-head.mp4",
  "audio": "dialogue.mp3",
  "audio_volume": 1.0
}'
添加背景音 / 音乐
# Merge dialogue with background music
belt app run infsh/media-merger --input '{
  "media": ["dialogue.mp3", "background-music.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
belt app run infsh/media-merger --input '{
  "media": ["segment1.mp3", "segment2.mp3", "segment3.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