AIIA Subtitle to Segments
Your old subtitles aren't garbage — feed them to this node
- segments_info
You've been there: you re-render the audio for a talking-head project with a new TTS engine, and suddenly the perfectly good subtitles from the old run are useless, because every timestamp is wrong. This node is the adapter that makes that old subtitle file worth keeping. It converts SRT or ASS text into the AIIA pack's segments_info JSON format - the same format the pack's own subtitle pipeline produces - so you can feed it back in as calibration data.
It lives at the front of a workflow that looks like this: old SRT → AIIA Subtitle to Segments → AIIA Subtitle Gen's calibration_info input, alongside a fresh, accurately-timed segments_info from your TTS run. Subtitle Gen then "snaps" the old subtitle text onto the new timing, solving the classic VibeVoice problem where batch-generated segments get approximate timecodes. The name undersells it; it's the re-dub workhorse.
How it works
Mechanically it's boring in the best way. It parses the text, auto-detects whether it's SRT or ASS, pulls out start time, end time, and the line, and normalizes everything into a JSON array of segments (with a speaker field, pulled from ASS if present, else Unknown). No models, no network, no GPU - a pure text utility.
The one quirk worth knowing: it accepts both a subtitle_text box and an optional subtitle_path. If the path points at a file that exists, the file wins and the text box is ignored. So if you're iterating on a subtitle file on disk, just wire the path and stop pasting.
The inputs that matter
There are only two, and you'll rarely touch both:
- subtitle_text - paste your SRT or ASS content here. Multiline, it does the right thing.
- subtitle_path (optional) - an absolute path to a subtitle file. Takes priority over the text box when the file exists.
Output: segments_info, a single STRING of JSON. That's what you wire into AIIA Subtitle Gen's calibration_info, or into anything else in the pack that consumes segment data.
Install
No special treatment. It ships in havvk/ComfyUI_AIIA: either search "ComfyUI_AIIA" in ComfyUI Manager, or:
cd ComfyUI/custom_nodes
git clone https://github.com/havvk/ComfyUI_AIIA.git
Then restart ComfyUI. There's nothing to download - no model, no FFmpeg, no Python deps beyond what the pack already needs.
Common issues
- "Nothing comes out of it." If your subtitle file is empty or unparseable, the node returns an empty JSON array rather than crashing - which is friendly, but means the next node silently sees no segments. Check your SRT numbering and timecode format.
- Path not picked up. The README is consistent about this across the whole pack: paths must be absolute and must actually exist. A relative path or a typo silently falls back to the text box.
- The pack is big. Installing AIIA to use one text node drags in a lot of code. If the whole pack feels like overkill, know that this node alone is a good reason - it's genuinely the missing "subtitle → segments" adapter in most of these pipelines.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| subtitle_text | STRING | — | |
| subtitle_pathopt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| segments_info | STRING | — |