Nodes/IndexTTS2-PauseControl/IndexTTS 定版 + SRT
ComfyUI Node

IndexTTS 定版 + SRT

Lock in the final cut and get matching subtitles in one pass

By lynx-gt·Created about a month ago·Updated about a month ago· 4
IndexTTS 定版 + SRT
    • srt_path
    • srt_text
    • log
    task
    custom_task
    chosen
    offset_ms0
    srt_path

    The batch produced candidates, Listen marked the winners, and now you have a pile of approved takes that need to become one finished audio track with subtitles that actually line up. That's IndexTTSSrt - the "定版 + SRT" node (finalize + SRT). It does two jobs in one pass: it reads your per-segment round choices from the manifest and assembles the final sequence, and it builds an SRT subtitle file by measuring the real duration of each chosen wav and accumulating timestamps. No estimation, no assumed speech rate - the timing comes straight from the actual audio files.

    The inputs

    • task / custom_task - the task directory, same pattern as the rest of the pipeline. It reads manifest.json from there.
    • chosen - which round wins per segment. The format is a comma list in segment order: 1,2,1,3 means segment 1 → round 1, segment 2 → round 2, and so on. A single value like 3 applies to all segments. Empty means "everyone's round 1." Since you marked acceptances in Listen, the natural workflow is to type the rounds you accepted. The node is forgiving: if you supply fewer values than segments, the remainder default to round 1; if a chosen file is missing, it's skipped and logged rather than failing the whole run.
    • offset_ms - global start offset for the whole subtitle timeline (useful if the assembled track is being placed into a longer video). Default 0.
    • srt_path - where to write the .srt. Leave blank and it saves 字幕.srt into the task directory.

    Outputs

    Three strings: srt_path (where the file was written), srt_text (the full SRT contents - handy if you want to preview it in a text node or post-process it), and log (a per-segment rundown of which round was used, its duration, and any missing files). There's no AUDIO output; this node finalizes metadata and subtitles, not the audio itself - the wavs are already on disk, which is the point of the whole manifest approach.

    One detail worth knowing: subtitle text has the [pause:N] markers stripped and replaced with commas, so captions read naturally and match what's spoken. The timing, meanwhile, is genuinely aligned - each segment's end time is the previous end plus that exact wav's measured length, which is why the subtitles survive pauses you inserted or fixed with the other nodes.

    Where it fits

    The tail end of the production loop:

    IndexTTSBatch → IndexTTSListen (accept rounds) → IndexTTSSrt → SaveTextFile / your editor
    

    This is the node that turns a batch of candidate audio into a deliverable. If you're dubbing a video, the SRT can feed a subtitle-burn node or a lip-sync stage; if you're making an audiobook, chosen plus the assembled wavs is the master. It's also the reason the pack bothered with acceptance marking in Listen in the first place - the pipeline remembers what you picked, and this node reads the memory.

    Troubleshooting

    • "manifest 不存在" (manifest missing) - no batch has run for this task yet, or you pointed at the wrong directory. Run IndexTTSBatch first.
    • Subtitles start too late/early in your video - that's what offset_ms is for.
    • A segment silently vanished from the SRT - its chosen round's wav wasn't on disk; the log lists exactly which files were missing.

    Installation is shared across the pack: ComfyUI Manager search IndexTTS2-PauseControl (or git clone https://github.com/lynx-gt/IndexTTS2-PauseControl into custom_nodes/, python install.py, restart), plus the ~11.8GB IndexTTS2 weights in ComfyUI/models/index_tts/.

    CategoryIndexTTS

    Inputs (5)

    NameTypeDefaultDescription
    taskCOMBO1 options:
    custom_taskSTRING
    chosenSTRING
    offset_msINT00–600000
    srt_pathSTRING

    Outputs (3)

    NameTypeDescription
    srt_pathSTRING
    srt_textSTRING
    logSTRING