FunASR Speech to Text
Offline Chinese speech-to-text for ComfyUI — no API key, no cloud, no lies
- audio
- text
FunASR Speech to Text is a custom node that transcribes audio to text entirely on your machine, built on Alibaba DAMO's FunASR framework. No API call, no key, nothing leaving your disk. The name is refreshingly honest: you feed it an AUDIO signal and it hands back a STRING of recognized text.
Why reach for it: audio is the thinnest layer of the ComfyUI ecosystem, and almost all of the speech tooling people bolt on is text-to-speech, not the reverse. This one covers a corner few nodes touch - Chinese-first ASR (the Paraformer-Large model) that runs offline and fast. The README claims RTF ≈ 0.004 on a 4090, meaning a 30-second clip transcribes in about a tenth of a second. Realistic uses: auto-captioning a video voiceover, transcribing audio to feed into an LLM node, or generating subtitle text inside a workflow you already run locally. If most of your audio is English, a Whisper-based node is the more general tool - this one earns its place when the audio is Chinese and you want it local.
How it works
The node takes a standard ComfyUI AUDIO value - the same thing LoadAudio and other audio nodes output - flattens it to mono, resamples to 16 kHz, and passes the raw waveform to FunASR's AutoModel. That "model" is really three models chained together: Paraformer-Large does the recognition, a small FSMN VAD detects where speech actually is so silence gets skipped (which is what lets it handle long files without a duration cap), and a CT-Transformer restores punctuation so you don't get a wall of run-together words.
First run is the expensive bit. The node lazily downloads three models from ModelScope into ComfyUI/models/funasr/ - about 2 GB total, and the punctuation model is the fat one at ~1.2 GB. After that they're cached and everything runs offline.
Inputs and outputs
audio(required, AUDIO) - wire in any audio source; LoadAudio is the obvious one.hotword(optional, STRING, multiline) - per the author's tooltip, "optional hotwords to boost recognition accuracy, one per line." If you're transcribing a domain full of proper nouns - product names, brand names, jargon - this genuinely helps. It's passed straight to FunASR's hotword argument.
Output is a single text STRING, and it also displays the transcript in the node UI - so it works fine as a terminal output node on its own. The string wires into anything that eats text: a save-text node, or an LLM node if you're building a pipeline that summarizes or acts on the transcript.
Install
Easiest via ComfyUI Manager: search "ComfyUI-FunASR" and install. Or do it by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/ahkimkoo/ComfyUI-FunASR
cd ComfyUI-FunASR
pip install -r requirements.txt # funasr>=1.0.0, modelscope, torchaudio
Restart ComfyUI and the node appears under the "FunASR" category.
Where people get burned
- The first run is a ~2 GB ModelScope download, and it's the number-one pain point. Outside China it can crawl or die mid-download. The README's fix: set proxies before starting ComfyUI -
export https_proxy=http://your-proxy:port- or pre-download the three models by hand with
modelscope download --model <id> --local_dir <dir>intomodels/funasr/.
- or pre-download the three models by hand with
- Dependency collisions.
funasris a heavy package andtorchaudiojoins your shared environment - the classic ComfyUI dependency-hell setup where some other pack pins a different torch/torchaudio and one of them stops importing. If ComfyUI breaks after this install, that's the usual suspect. - Chinese-first. English gets you something, but don't expect Whisper-class English.
- GPU is automatic - FunASR uses CUDA when torch can see it. If transcription is suspiciously slow, check that your torch build actually has CUDA, because a CPU-only one will chug on long files.
The pack is small and young - two nodes, one author, almost no Western community footprint - but the engine underneath is real Alibaba research, not a wrapper around a wrapper. For offline Chinese transcription inside a graph, this is about the only thing that does the job without phoning home.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| audio | AUDIO | — | |
| hotwordopt | STRING | Optional hotwords to boost recognition accuracy, one per line |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |