Generate SRT
Turn a raw transcript into timed subtitles
- forced_aligns
- srt_string
A transcript is a wall of text with no clock. An SRT file is that same text chopped into subtitle-sized chunks, each stamped with a start and end time. This node is the machine that does the chopping and stamping - it sits at the very end of VoiceBridge's transcription chain and produces the subtitle file you actually want to ship.
What it actually does
Wire it after VoiceBridge ASR Transcribe and it turns three things - the word-level forced alignment list, the full transcribed text, and a language name - into a properly formatted SRT string. It does this in three passes you can watch happen in the console (the pack logs everything with a [VoiceBridge] prefix):
- Segmentation. The raw text is split into subtitle-sized segments using punctuation as the break points. Which punctuation depends on the
languageinput:"Chinese"splits on,。!?;:, everything else splits on,.!?;:. The splitter is polite about numbers, so3.5and times like10:30don't get ripped apart mid-value. - Timing. Each segment is mapped to a start/end time by walking through the word-level timestamps in
forced_aligns- that's why this node needs the forced aligner hooked up on the ASR loader side (seeVoiceBridge ASR Loader). No word timestamps, no subtitle timing; they're the same thing here. - Cleanup and output. Overlapping or stray segments get adjusted, tiny filler words like "hi" and "hey" get merged into the previous line, and the result is emitted as a standard
N\n00:00:01,000 --> 00:00:03,200\nTextSRT string.
The inputs that matter
forced_aligns(LIST) - comes straight from theforced_alignsoutput ofVoiceBridge ASR Transcribe. This is the timing source; don't skip it.text(STRING) - the transcript, usually thetextoutput of the transcribe node.language(STRING) - mostly a segmentation switch here, so get it right:"Chinese"uses Chinese punctuation rules, anything else uses English ones.
The two optional inputs are less interesting: save_srt defaults to True, which means the node writes a .srt file into ComfyUI/output/ as a side effect, and filename_prefix (default VoiceBridge_subtitle) is the base name - if the file already exists it gets _1, _2, and so on appended rather than overwritten. Set save_srt to False if you only want the string, for example when you're going to edit it before saving.
The single output is srt_string, and it feeds anything that eats SRT text: SRT To Audio for the legacy pipeline, VoiceBridge SRT Splitter for the decoupled one, Save SRT From String if you want the file saved somewhere specific, or just a text preview node.
Installing and running it
This node ships in the comfyui_voicebridge pack. Install via ComfyUI Manager (search "VoiceBridge") or:
cd ComfyUI/custom_nodes
git clone https://github.com/YanTianlong-01/comfyui_voicebridge.git
cd comfyui_voicebridge
pip install -r requirements.txt
Restart ComfyUI after installing. The heavy lifting here is upstream: you need the ASR model (auto-downloaded into ComfyUI/models/Qwen3-ASR/ on first use) and the Qwen3-ForcedAligner-0.6B model selected on the loader, or Generate SRT has no timestamps to work with.
Where people get burned
The most common failure is wiring a plain text output into Generate SRT and expecting timing out of nowhere - it doesn't work that way. If your SRT comes out as one giant untimed block, check that return_timestamps is enabled on the transcribe node and that a forced aligner is loaded. The language mismatch is the other classic: transcribe in Chinese but leave language at its default, and the segmentation will be looking for English punctuation that isn't there. And remember this pack is young - 0 impressions and basically no community write-ups yet, so the console logs are your friend.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| forced_aligns | LIST | — | |
| text | STRING | — | |
| language | STRING | — | |
| save_srtopt | BOOLEAN | true | — |
| filename_prefixopt | STRING | VoiceBridge_subtitle | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| srt_string | STRING | — |