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 角色A|这是第二句。|ZH|0.9 | 支持 角色|台词|语言|时长系数、JSON 数组或 SRT。此输入已关闭 ComfyUI 动态提示词解析,JSON 的大括号不会被改写。 |
| default_role | STRING | 旁白 | — |
| default_language | COMBO | ZH | 5 options: ZH, EN, JA, ES, AR |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| 台词脚本 | T8_INDEXTTS25_DIALOGUE_SCRIPT | — |
| 解析预览 JSON | STRING | — |