IndexTTS 2.5 批量台词 / SRT · T8star-Aix
Batch dialogue and SRT, parsed without mangling your JSON
- 台词脚本
- 机器解析预览 JSON(无需手写)
- 一行一句可编辑批量脚本
Typing dialogue line-by-line into separate Generate nodes is the slow way to do multi-role TTS. This node is the fast way: paste a whole script - batch format, a JSON array, or a real SRT file - and it comes out the other side as a structured T8_INDEXTTS25_DIALOGUE_SCRIPT ready for the multi-role/SRT generation node, plus a parse-preview JSON you can inspect before spending any GPU time.
The three input formats
Batch (the default). One line per utterance, 角色|台词|语言|时长系数 - language and duration factor optional:
角色A|你终于来了。|ZH|1.0
角色B|好,我们开始吧。|ZH|0.9
JSON array. Same content, structured - handy when the script comes out of another node or a generator:
[{"role": "角色A", "text": "第一句。", "language": "ZH", "duration_factor": 1.0}]
SRT. Real subtitles, with the role pulled from the text - both [角色A] 台词 and 角色B:台词 prefixes are recognized, so subtitles you got from elsewhere usually parse as-is.
Set script_type to batch or srt (both accept JSON). default_role and default_language fill in the blanks for lines that omit them - a plain line with no prefix and no language spec becomes the default role speaking the default language.
The gotcha the README warns about
The script input has ComfyUI's dynamic-prompt parsing explicitly disabled. This is deliberate and worth understanding: ComfyUI historically treats {...} in text fields as dynamic prompts and rewrites them at queue time, which used to corrupt pasted JSON mid-{ - the old error was literally Expecting ',' delimiter at queue time. Since v0.5.1 the pack disables that parsing on this input, so your JSON braces survive intact. Don't "fix" this by re-enabling dynamic prompts.
Outputs
台词脚本 - the parsed, typed script object for the generation node. 解析预览 JSON - the structured payload (every line with its role, text, language, duration factor), which is your cheap sanity check: parse errors surface here as readable messages before you queue a multi-line synthesis. A line missing a role that isn't in your cast will fail validation here with a specific "no connected voice for role X" message when it reaches the generator.
Realistic positioning
This node does parsing and structure only - zero model load, zero audio. Its job is to keep the script and the audio pipeline decoupled: edit the script text, re-parse, re-generate, and the cast (voice profiles) doesn't move. If you're doing a one-shot single-voice line, skip it and use Generate directly. The moment you have a second line and a second voice, this is the input you want feeding the generator.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| script_type | COMBO | batch | 2 options: batch, srt |
| script | STRING | 旁白|先用平静语气介绍。|ZH|1.0|text:平静、从容;strength=0.75 旁白|同一个角色突然非常生气!|ZH|1.0|vector:0,0.8,0,0,0,0,0,0;strength=0.85 旁白|这一句恢复角色默认情感。|ZH|1.0 | 推荐每行:角色|台词|语言|时长系数|逐句情感。情感可写 text:描述、vector:8个数、speaker;可追加 ;strength=0~1 和 ;random=true。留空继承角色;旧 JSON 数组仍然兼容。台词中的 | 请写成 \|。此输入已关闭 ComfyUI 动态提示词解析,JSON 的大括号不会被改写。 |
| default_role | STRING | 旁白 | — |
| default_language | COMBO | ZH | 用于脚本解析预览和兜底;生成时,逐句显式语言优先,其次使用角色音色的默认语言。 |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| 台词脚本 | T8_INDEXTTS25_DIALOGUE_SCRIPT | — |
| 机器解析预览 JSON(无需手写) | STRING | — |
| 一行一句可编辑批量脚本 | STRING | — |