Nodes/ComfyTV/Subtitles · Speech-to-Text
ComfyUI Node

Subtitles · Speech-to-Text

Speech-to-text subtitles, generated from the clip's own audio

By jtydhr88·Created 3 months ago·Updated about 15 hours ago· 725
Subtitles · Speech-to-Text
  • video
  • audio
  • subtitles
force_run_token0
project_id
parent_output_id0
workflow

Transcribing a video's dialogue is the most tedious part of adding subtitles, and it's also exactly the thing a local model can do for you. SubtitleGen is the ComfyTV stage that runs speech-to-text on your clip and hands you back a subtitle track - which you then feed to the Subtitle stage to burn onto the picture. The typing part is gone.

It's a ComfyTV Video stage. Feed it a video or an audio file, hit Run, and get COMFYTV_TEXT out: the transcribed subtitle track.

The inputs

  • workflow - a dropdown of speech-to-text workflows. This is the honest catch, so let's get it out of the way: this stage is workflow-driven, meaning it runs a ComfyUI workflow you have available, the same way the pack's upscale and text stages do. At the time of writing the pack ships a speech (text-to-speech) workflow folder but no ready-made speech-to-text one - the dropdown shows what you've added, and out of the box that can be empty. The author's docs and roadmap treat STT subtitle generation as a wired-up feature, but the actual workflow you run is on you to supply, e.g. via the pack's custom-workflows mechanism (docs/custom-workflows.md).
  • video (optional) or audio (optional) - the source. If you wire audio, it uses that; otherwise it pulls the track out of the video. It errors if neither is present ("Speech-to-Text needs an upstream audio or video").

The project_id / parent_output_id / force_run_token inputs are internal frontend plumbing - ignore them.

How it works

The stage wraps the pack's workflow-invocation machinery: it packages your audio (or the audio extracted from your video) as the upstream input, invokes the selected speech-to-text workflow on your local ComfyUI, and shapes the result into a COMFYTV_TEXT payload. That output is designed to plug straight into the Subtitle stage's subs_text input, which parses the cues and burns them. Transcribe → burn, no file juggling between.

Install

ComfyTV ships ~190 stages in one pack; installing the pack gives you this node.

cd ComfyUI/custom_nodes
git clone https://github.com/jtydhr88/ComfyTV

Restart ComfyUI fully and find it under ComfyTV → Video. ComfyUI Manager also finds it by searching "ComfyTV". The pack itself declares zero Python dependencies and needs no model downloads for the stage - but the speech-to-text workflow you pick will want its own STT model, so read that workflow's requirements. On ComfyUI Desktop or macOS, clone into the running instance's absolute path from the startup log rather than trusting the relative cd.

Troubleshooting

  • Dropdown is empty. There's no shipped STT workflow yet - add one via the pack's custom-workflows flow (or check comfytv.org, where per-node reference and newer workflow bundles land first).
  • "needs an upstream audio or video" - wire one of the two inputs; video alone works because the stage extracts its audio.
  • Transcript is garbled. That's your STT model, not the stage. Try a different workflow/model in the dropdown - transcription quality is the model's job.

When paired with a decent STT workflow, this is the node that makes captioning every video a two-click habit instead of a chore. Just budget for supplying the workflow itself.

CategoryComfyTV/Video

Inputs (6)

NameTypeDefaultDescription
force_run_tokenINT00–2147483647Internal — bumped on Run to invalidate ComfyUI's input cache.
project_idSTRINGInternal — populated by the projectStore on the frontend.
parent_output_idINT00–2147483647Internal — lineage parent set by spawn handlers on the frontend.
workflowCOMBOWhich speech-to-text workflow to run.
videooptCOMFYTV_VIDEO
audiooptCOMFYTV_AUDIO

Outputs (1)

NameTypeDescription
subtitlesCOMFYTV_TEXT