IndexTTS 批量生成
Batch TTS with resumable rounds and a manifest
- model
- task_dir
- manifest_path
- progress
IndexTTSSingle is for one take. IndexTTSBatch is for the other end of the scale: a full script, a chapter, a whole audiobook, done in one run and safe to interrupt. It's the pack's production workhorse - it takes a Markdown script (or plain lines of text), generates several candidate takes per segment, writes everything to disk with a manifest, and lets you re-run to resume instead of starting over. If you're dubbing anything longer than a paragraph, this is the node you build the workflow around.
Feed it text
Two ways in, pick one:
segments_md- a file path to a Markdown script. The format is pleasantly structured: an optional YAML header (story,voice_ref,emotion_base,emotions,speaking_speed,max_text_tokens_per_segment), then one# 片段 N [role / emotion]heading per segment followed by its text. The[pause:N]markers carry through verbatim, and if a segment has an<!-- 处理后: ... -->comment, that content wins. The emotion tag in the heading feeds emotion-reference selection.text- no file? Just type the script with one line per segment.
One sentence per segment is the recommended rhythm - period pauses stay uniform via interval_silence (default 400ms, the same fix as the single node), and you override individual ones with markers.
What you'll actually set
pause_mode- same switch as IndexTTSSingle, and yes, same rule: off means[pause:N]gets spoken out loud. On this node it also skips the old whisper-based post-processing path entirely (the new waveform method does it insideinfer), which means you don't need a whisper model installed for the current path.rounds- how many candidate takes per segment, 1–10, default 3. Output files look like001_1.wav,001_2.wav,001_3.wav- segment 001, rounds 1–3. Rounds exist because TTS is stochastic; withrounds=3you almost always get a take where every marker hits.spk_ref- the voice reference audio, same as the single node.seed- fixed seed reproduces takes; at -1, each round's actual seed is written next to its wav as a.seedfile so you can pin a winner later.start/end- filter to a segment range, handy for re-running just the back half.emo_strategy-固定(fixed) or目录随机(random per directory) for picking emotion references, withemo_ref/emo_diras the sources. Only interesting if you're doing character work.tagandoutput_dir- name the task and/or force where files land.
The sampling stack (temperature, top_p, top_k, num_beams, etc.) is the same set with the same sane defaults as the single node. Don't touch them until you have a reason.
How the plumbing works
Each run produces a task directory, default ComfyUI/output/<tag>_<timestamp>/. Inside: the wavs, the .seed files, and a manifest.json that records every parameter plus per-segment, per-round seeds, durations, and acceptance marks. The manifest is written after every round, which is what makes resume real: re-run the node with the same task directory and completed rounds are skipped. Change a parameter and the manifest's hash mismatches, so it rebuilds cleanly instead of silently mixing old and new audio. That's the difference between a batch tool and a script someone wrote on a Tuesday.
You get three outputs: task_dir (feed it straight into IndexTTSListen), manifest_path, and progress (a summary string like "任务完成:5/5 段").
Wiring
The production loop the pack is built around:
IndexTTSLoader → IndexTTSBatch (pause_mode on, rounds=3) → IndexTTSListen → PreviewAudio×3
Troubleshooting
- "没有可用的文本" (no usable text) - the script path was invalid and the text box was empty. Fix one of them.
- A pause is off in one segment - don't rerun the batch. IndexTTSFix edits a single wav's pauses directly, and IndexTTSListen can mark a good round as accepted so downstream nodes know which take won.
- Long single sentence, multiple markers, one misses - the by-character-proportion estimation drifts past 40 chars. Change the seed or lean on
roundsand pick the winning take. The README's stress data says 3 rounds usually contains a clean one.
Inputs (25)
| Name | Type | Default | Description |
|---|---|---|---|
| model | INDEXTTS_MODEL | — | |
| segments_md | STRING | — | |
| text | STRING | — | |
| spk_ref | STRING | — | |
| emo_strategy | COMBO | 固定 | 2 options: 固定, 目录随机 |
| emo_ref | STRING | — | |
| emo_dir | STRING | — | |
| rounds | INT | 31–10 | — |
| tag | STRING | 批量生成 | — |
| output_dir | STRING | — | |
| start | INT | 0 | — |
| end | INT | 0 | — |
| auto_pause | BOOLEAN | true | — |
| whisper_model | STRING | base | — |
| pause_mode | BOOLEAN | false | 开启 [pause:N] 全波形精确停顿(infer 内部处理,免 whisper 后处理;开启后 auto_pause 后处理自动跳过) |
| seed | INT | -1-1–9223372036854776000 | — |
| temperature | FLOAT | 0.600.01–2 | — |
| top_p | FLOAT | 0.800.01–1 | — |
| top_k | INT | 200–200 | — |
| num_beams | INT | 41–8 | — |
| do_sample | BOOLEAN | true | — |
| repetition_penalty | FLOAT | 10.01–30 | — |
| emo_alpha | FLOAT | 0.750–1 | — |
| speaking_speed | FLOAT | 1.00.5–2 | — |
| interval_silence | INT | 4000–2000 | 段间插入静音(ms):每段结束到下一段开始的固定停顿 |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| task_dir | STRING | — |
| manifest_path | STRING | — |
| progress | STRING | — |