Instructions to use monolithdm/kokoro-82m-kora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers.js
How to use monolithdm/kokoro-82m-kora with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('text-to-speech', 'monolithdm/kokoro-82m-kora');
Kokoro-82M (ONNX) with per-phoneme durations
The ONNX export of Kokoro-82M with one extra output, pred_dur: the predicted duration of every input
phoneme token, used to drive lip-sync for an animated avatar.
- Audio is unchanged. The graft adds a single Identity node exposing an existing integer tensor
(
/encoder/Cast_output_0) as a graph output; the waveform path is untouched. Verified bit-identical against the source export (59,400 samples, max difference 0). - Units: one duration unit = 600 samples at 24 kHz = 25 ms.
pred_durhas one value per input token (phoneme characters plus the start/end pad tokens). - Files:
onnx/model.onnx(fp32, WebGPU) andonnx/model_quantized.onnx(q8, CPU/WASM), plus the original config and tokenizer. Voices load from the upstream repo.
Credits
- Model: hexgrad/Kokoro-82M (Apache-2.0)
- ONNX export: onnx-community/Kokoro-82M-v1.0-ONNX (Apache-2.0)
- Graft method:
scripts/graft_pred_dur.pyfrom lorefoundry/tts-pack (Apache-2.0), run unmodified on the onnx-community export.
- Downloads last month
- 8