Nodes/ComfyUi-MpiNodes/Mpi Speech To Text
ComfyUI Node

Mpi Speech To Text

Words and an SRT file out of an audio wire

By MadPonyInteractive·Created about a year ago·Updated about 5 hours ago· 4
Mpi Speech To Text
  • audio
  • text
  • srt
◄model▾►
◄context►

You've got a voice track and you want the words: to caption a clip, to feed a lip-sync model, to search your own projects, or just to know what the take actually says. In ComfyUI, transcription has mostly meant installing a whole other node pack. This one lives in a general utility pack you may already have, takes the AUDIO type directly, and returns both a plain transcript and SRT subtitles.

What it runs

Qwen3-ASR, Apache-2.0, which Qwen shipped in late January 2026 - the reaction was immediate and the "Comfy when?" reply landed within hours. The interesting part for ComfyUI users is how it's loaded: on the engine's own transformers, because recent versions ship qwen3_asr directly. So the pack gains no new pip requirement for this node. Only the weights are new, and you put them where the node can see them.

How it works

Audio is down-mixed to mono and resampled to whatever rate the model's processor wants (so a 48 kHz video track or a 44.1 kHz music file both go in clean).

Then the segmentation, which is the part that actually decides whether you get usable subtitles. Loudness is measured in 30 ms frames, and a quiet run of 0.3 s or longer counts as a pause. Up to 20 seconds is transcribed in one pass. Longer audio is cut at the longest pause inside each 20-second window, deliberately - the author's note is that cutting at every pause broke sentences and lost words at the joins. If a stretch has no pause by the time it hits 20 s, it takes the first pause before 30 s, and failing that a hard cut at 20. Pieces that are silent are dropped entirely, because the model happily invents words for silence.

The srt output comes out of those same spans: cues longer than 84 characters split at spaces, and the cue's time is shared over the talking time with pauses left out, so a cue starts after a pause rather than inside it. Short loud blips under 0.12 s are ignored - a mic-stop click had put a subtitle 1.2 s early.

Inputs and outputs

  • audio - any AUDIO. The pack's own loaders work, and so does the audio track of a video file.
  • model - a folder under models/speech_to_text/ containing a config.json. The combo lists every one it finds.
  • context (optional, multiline) - free text the model reads first. This is the useful knob: put names and jargon in it and it spells them your way. Empty means plain transcription in whatever language is spoken.

Two STRING outputs: text and srt. Wire text into a CLIP Text Encode for a lip-sync or audio-driven graph; take srt out to a file with any text-save node.

Installing it

Standard pack install - ComfyUI Manager, search the pack title, or:

cd ComfyUI/custom_nodes
git clone https://github.com/MadPonyInteractive/ComfyUi-MpiNodes
# restart ComfyUI

Then the weights, which are a Hugging Face folder rather than a single file:

pip install -U "huggingface_hub[cli]"
huggingface-cli download Qwen/Qwen3-ASR-0.6B-hf \
  --local-dir ComfyUI/models/speech_to_text/Qwen3-ASR-0.6B-hf

That's roughly 1.6 GB for the 0.6B. You need the whole folder - config.json, the safetensors, tokenizer and processor config - because the node checks for config.json to decide whether a folder is a model.

Where people get burned

An old transformers fails at run time, not install time. The model class is imported inside the function, so an out-of-date version still installs the pack and lists the node - and then throws ImportError: cannot import name 'Qwen3ASRForConditionalGeneration' when you queue. That's the first thing to check if the node appears and then dies.

An empty model combo means no folder with a config.json was found. And if you named a folder that later went missing, you get a plain file-not-found raise.

The timestamps come from pause detection, not alignment. There is no forced aligner here, so on dense, fast, or overlapping speech the subtitle times will drift from the words. That's a real limitation and worth knowing before you blame the model: Qwen's own forced aligner, which does word-level timing, doesn't cover every language anyway - in the release thread its Hindi output was only partial even though the transcription itself was correct.

The VAD is loudness only. Music, room noise, or two people talking at once can fool it into a piece the model then mis-hears or paraphrases.

Finally, memory: the model stays resident in RAM (~1.6 GB for the 0.6B) on the CPU between runs and moves to the GPU only while it transcribes. It's polite about VRAM, not about RAM.

CategoryMpi/Audio

Inputs (3)

NameTypeDefaultDescription
audioAUDIO—
modelCOMBO0 options:
contextoptSTRING—

Outputs (2)

NameTypeDescription
textSTRING—
srtSTRING—