Nodes/ComfyUI_AIIA/AIIA Subtitle Generation
ComfyUI Node

AIIA Subtitle Generation

Subtitles Straight From the Generation Timeline, SRT or ASS

By havvk·Created about a year ago·Updated 6 months ago· 13
AIIA Subtitle Generation
  • calibration_info
  • srt_content
  • ass_content
segments_info
formatSRT
save_filefalse
ass_styleDefault
filename_prefixaiia_subtitle

When you generate a podcast with the AIIA nodes, the timeline (which line starts when) is produced right alongside the audio. AIIA Subtitle Generation turns that timeline into actual subtitle files - no speech-to-text pass needed, because it never has to re-transcribe. It outputs SRT for universal compatibility and ASS for styled, per-speaker colored subtitles, and it's the natural finishing node for a dialogue workflow that already has a segments_info JSON in hand.

How it works

Feed it segments_info (the timeline from a dialogue TTS node, the stitcher, or the segment generator) and pick a format - SRT, ASS, or Both. It formats each segment's start/end timestamps into subtitle blocks:

  • SRT - the boring, universal format that every player and editor eats.
  • ASS - the styled one. The node scans the speakers in the timeline, assigns each a color from a small palette, and emits styled dialogue lines. If you're burning subtitles into a video or making a fancy local clip, this is the format you want.
  • ass_style - lets you name an existing style from your ASS style template instead of the built-in Default.

The optional calibration_info input is the clever bit: connect the output of AIIA Generate Speaker Segments (the VAD-based diarization) and the node "snaps" the estimated timestamps to real speech activity. That's the fix for engines like VibeVoice whose batch mode produces approximate timelines that drift - the calibration re-anchors each line to where speech actually is. You can also calibrate against a known-good transcript via the pack's Subtitle to Segments node.

save_file toggles writing to ComfyUI's output directory (with a filename_prefix and timestamp). Outputs are the srt_content and ass_content strings regardless - it's an output node, so the text shows up in the UI.

The inputs that matter

  • segments_info - required, forceInput. Wire it from your TTS/stitcher.
  • format - SRT vs ASS vs Both. Pick Both if you're not sure; it costs nothing.
  • calibration_info - optional but genuinely worth connecting when your audio came from a batch TTS engine. Without it, VibeVoice-era timelines can drift noticeably by late in a long file.
  • save_file - off by default; flip it when you actually want a file on disk.

Where it fits

The pack's podcast flow: Script Parser → TTS → Subtitle Gen gives you subtitles for a generated dialogue without any ASR. Pair the srt_content output with AIIA Subtitle Preview to eyeball sync, or feed it to a burn-in node. One caveat: if your segments_info came from a source that doesn't know real timing, the output is only as good as that timeline - that's exactly the case where calibration_info earns its keep.

Install

Standard pack install: havvk/ComfyUI_AIIA via ComfyUI Manager or git clone https://github.com/havvk/ComfyUI_AIIA.git into custom_nodes/, restart. No models, no dependencies.

CategoryAIIA/Subtitle

Inputs (6)

NameTypeDefaultDescription
segments_infoSTRING
formatCOMBOSRT3 options: SRT, ASS, Both
save_fileBOOLEANfalse
calibration_infooptWHISPER_CHUNKS
ass_styleoptSTRINGDefault
filename_prefixoptSTRINGaiia_subtitle

Outputs (2)

NameTypeDescription
srt_contentSTRING
ass_contentSTRING