Kokoro-82M German, ONNX for the browser (WebGPU + WASM)
A browser-ready ONNX export of the German Kokoro-82M fine-tune by Software Mansion, used by the Mark to Read Chrome extension.
| File | Precision | Size | Intended runtime |
|---|---|---|---|
onnx/model.onnx |
fp32 | 326 MB | ONNX Runtime Web, WebGPU |
onnx/model_quantized.onnx |
dynamic uint8, per channel | 93 MB | ONNX Runtime Web, WASM / CPU |
voices/df_anna.bin |
float32 [510, 256] |
0.5 MB | voice style ("Anna", female) |
Interface
Same as the official Kokoro ONNX models:
- inputs:
input_idsint64[1, n](Kokoro v1.0 vocabulary, token0at both ends),stylefloat32[1, 256],speedfloat32[1] - outputs:
waveformfloat32 (24 kHz mono),durationint64 - style row:
voice[phoneme_count - 1]
Input phonemes are IPA in Kokoro's notation; the matching German G2P is Phonemis (MIT).
How it was made
- Source weights:
finetunes/kokoro_german_converted.pthfrom software-mansion/react-native-executorch-kokoro (revision3744b57964eab7df6e8c48f0b84badb29e14df07, Apache-2.0). - The checkpoint stores weight-norm layers in the newer
parametrizations.weight.original0/1format; these were mapped back toweight_g/weight_vso that every weight loads (the stock loader silently skips them). - Exported with
kokoro0.9.4 (disable_complex=True), PyTorch 2.5.1, opset 17, with three graph simplifications that are exact for batch size 1: packed sequences removed, InstanceNorm written as mean/variance, and the all-false masks and identity zero-padding copies removed. Without these, ONNX Runtime's WebGPU backend produces wrong durations and garbled audio. model_quantized.onnx:onnxruntime.quantization.quantize_dynamic(QUInt8, per channel; MatMul, Gemm, Conv, ConvTranspose, LSTM).
Validation
Against the independent Kokoro KMP German export (CPU) and against each other, using log-spectrogram correlation:
- fp32, CPU: identical durations, similarity 0.996–0.998 (same as re-running the reference)
- fp32, WebGPU (ONNX Runtime Web 1.22): identical durations, similarity 0.985
- quantized, CPU: mean similarity 0.97 to fp32 (the official English q8 model scores ~0.96 the same way)
License and credits
Apache-2.0. Kokoro-82M by hexgrad; German fine-tune by Software Mansion; conversion by S3P Studios.