Kokoro Audio Generator
Give your ComfyUI workflow a voice — text in, WAV out, no API key
- model
- audio
Kokoro Audio Generator is the text-to-speech half of the jhj0517/ComfyUI-jhj-Kokoro-Onnx pack. Type a sentence (or wire text in from another node), and it hands you a real audio clip. That's the whole pitch: TTS inside ComfyUI, on your own machine, with no API account and no internet once the model's downloaded. If you've ever wanted to narrate a generated video, give a character dialogue, or just make your image batch talk, this is the node that does it.
For context - audio was ComfyUI's afterthought for a long time. The video ecosystem grew first, and sound only followed along (LTX-2's native sync audio, the VHS/AudioScheduler crowd). A standalone open TTS model that runs on a potato was rare. Kokoro changed that when it landed in early 2025: the community's default "open source TTS king" until bigger models like Zonos and Chatterbox came along later that year. This wrapper puts that model on your graph.
How it works
The node doesn't do the heavy lifting itself. It takes a KOKORO_ONNX connection from the pack's other node, (Down)Load Kokoro Model, and calls into the kokoro-onnx library - the ONNX Runtime port of Kokoro, an ~82M-parameter Apache-2.0 model by Hexgrad. Small enough to run faster than real time on CPU; no CUDA needed, and the loader grabs whatever execution provider is available. Your text gets phonemized, the model synthesizes a waveform, and the node packages it as ComfyUI's standard AUDIO format (waveform tensor plus sample rate, 24 kHz). From there it plugs into anything that accepts AUDIO - the example workflow wires it straight into a SaveAudio node.
The inputs that matter
- text (STRING, required) - what you want spoken. Type it or wire it from a text node like the example's "easy string". Multi-line works fine.
- voice (enum, default
af) - 11 voices in v0.19. Kokoro's naming tells you what you're getting: first letter is the accent (a = American, b = British), second is the gender (f/m), then a name.afis the default American female;bm_lewisis a British male. - lang (enum, default
en-us) - en-us, en-gb, fr-fr, ja, ko, cmn. Match it to the voice's accent or you get an American voice chewing on British English. - speed (FLOAT, default 1.0, step 0.1) - the example workflow uses 1.1 for a touch of pickup. Push it far and it gets robotic fast.
- phonemes (optional STRING) - hand Kokoro pre-computed phonemes if you need surgical pronunciation control. Leave blank otherwise.
- trim (optional BOOLEAN, default true) - chops silence off the ends of the clip. Leave it on.
And don't forget the model input - that KOKORO_ONNX wire from the loader is required, and the node has nothing to run without it.
Install
Easiest path is ComfyUI Manager: search "ComfyUI jhj Kokoro Onnx", install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/jhj0517/ComfyUI-jhj-Kokoro-Onnx.git
cd ComfyUI-jhj-Kokoro-Onnx
pip install -r requirements.txt
Portable ComfyUI users run the same pip line with python_embeded\python.exe -m pip. The requirements pull in kokoro-onnx plus onnxruntime-gpu - that second one is the heavy download, but kokoro-onnx falls back to CPU automatically if you don't have a GPU. The model itself (the ONNX file plus voices.bin) auto-downloads to ComfyUI/models/kokoro-onnx the first time you run the loader node - not at install time.
Gotchas
Your first run stalls for a minute while those files pull down; that's the progress bar in the ComfyUI console, not a freeze. The classic "why does it sound wrong" is voice/language mismatch - pick bm_george but leave lang on en-us and you get a very American British accent. And don't expect voice cloning: Kokoro was trained on a smallish voice set (sub-100 hours, per the community), so you get fixed voices, not your own. For narration, dubbing, and character lines it's genuinely great. It is not an ElevenLabs replacement, and nobody claims otherwise.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| model | KOKORO_ONNX | — | |
| text | STRING | — | |
| voice | COMBO | af | 11 options: af, af_bella, af_nicole, af_sarah, af_sky, am_adam, +5 |
| lang | COMBO | en-us | 6 options: en-us, en-gb, fr-fr, ja, ko, cmn |
| speed | FLOAT | 1.0 | — |
| phonemesopt | STRING | — | |
| trimopt | BOOLEAN | true | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| audio | AUDIO | — |