Nodes/ComfyUI-faster-whisper/FasterWhisper To Subtitle
ComfyUI Node

FasterWhisper To Subtitle

FasterWhisper To Subtitle

By jhj0517·Created 2 years ago·Updated about a year ago· 23
FasterWhisper To Subtitle
  • transcriptions
  • subtitle text
subtitle_format

The moment your transcription stops being a list of timestamps and becomes an actual caption file happens in this node. It takes the TRANSCRIPTIONS object from FasterWhisperTranscription and reformats it into the text of a subtitle file - either .srt or .vtt - so you can take it the rest of the way to a file on disk.

It's a small node, and that's the point. Transcribing is the expensive, interesting part; formatting is the fiddly, easy-to-get-wrong part, and this node exists so you never hand-write a cue.

How it works. The node walks every segment in the transcriptions list and builds the standard cue block: a sequence number, a start --> end timing line, and the text. The only real difference between formats is handled for you - SRT uses a comma before milliseconds (00:00:01,500) while VTT uses a dot (00:00:01.500), and VTT gets the required WEBVTT header on top. That's the entire distinction, and it's the kind of thing that silently breaks players if you get it wrong, so let the node own it.

Inputs and output. Two required inputs:

  • transcriptions (TRANSCRIPTIONS) - wire this from FasterWhisperTranscription.
  • subtitle_format - a dropdown with .srt and .vtt. SRT is the safe default that every player accepts; VTT if you're going straight into an HTML5 player or YouTube.

The single output is subtitle text (type SUBTITLE). Worth knowing: the SUBTITLE object is actually a small package - the formatted text plus the format it was generated as. That's why SaveSubtitle can figure out the .srt vs .vtt extension on its own without asking you again. It also means you don't need to remember which format you picked two nodes back; the format travels with the text.

One thing that catches people: this is not an output node. It doesn't write anything to disk and won't show up in your output folder. If you queue a workflow that stops here, you'll see a subtitle text result in the node but no file anywhere. That's by design - you finish the chain with SaveSubtitle, which turns the SUBTITLE into an actual file (and returns the path so you can do something with it). Preview the text here, save it there.

Install. Identical to the rest of this pack - search "ComfyUI-faster-whisper" in ComfyUI Manager, or cd ComfyUI/custom_nodes && git clone https://github.com/jhj0517/ComfyUI-faster-whisper, then pip install -r requirements.txt from inside the pack folder (portable installs: python_embeded\python.exe -m pip install -r ...). There's nothing extra to download for this node; it's pure formatting.

Troubleshooting. Not much to go wrong here - if you're seeing garbled output, the problem is upstream in the transcription (wrong language, or hallucinated segments you should have filtered with vad_filter), not in the formatting. The one thing to check: the cue timings come straight from faster-whisper's segment boundaries, so if your captions feel early or late, that's a model/transcription quirk, not a formatting bug - you'll fix it at the transcription node, or in the edit before you burn them in.

CategoryFASTERWHISPER

Inputs (2)

NameTypeDefaultDescription
transcriptionsTRANSCRIPTIONS
subtitle_formatCOMBO2 options: .srt, .vtt

Outputs (1)

NameTypeDescription
subtitle textSUBTITLE