Downloads · 30 days
0
gregbarbosa/kokoro-82m-ane-coreml
kokoro-82m-ane-coreml is a machine learning model from gregbarbosa. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Seven-stage Core ML conversion of hexgrad/Kokoro-82M (Apache-2.0) for on-device text-to-speech entirely on Apple's Neural Engine, adapted from laishere/kokoro-coreml (Apache-2.0).
Downloads · 30 days
0
Access
Public
Updated Oct 20, 2026
Repo size
105 MB
Likes
0
Public
Click a slice to open those files.
.bin101 MB · 99%
From the Hugging Face model README
Seven-stage Core ML conversion of hexgrad/Kokoro-82M (Apache-2.0) for on-device text-to-speech entirely on Apple's Neural Engine, adapted from laishere/kokoro-coreml (Apache-2.0).
Consumed by Vox as the
kokoro-82m-ane TTS engine. Benchmark (M1 Pro): 19–22.6× realtime flat,
75–850 ms time-to-first-chunk.
KokoroAlbert.mlmodelc, KokoroPostAlbert.mlmodelc, KokoroAlignment.mlmodelc,
KokoroProsody.mlmodelc, KokoroNoise.mlmodelc, KokoroVocoder.mlmodelc,
KokoroTail.mlmodelc — compiled Core ML stages. All seven must load with
.cpuAndNeuralEngine ("strict" placement): mixed placement costs 2–4×, and
Prosody on .all segfaults on macOS 27 (mps.expand_dims invalid axis).
Static shapes: ALBERT ≤ 510 phonemes, vocoder ≤ 2000 frames.vocab.json — Kokoro phoneme→token map.voices/*.bin — raw fp32 [510, 256] voice embeddings (row = token count − 1;
first 128 dims timbre, last 128 style). Converted from the upstream
voices/*.pt tensors; the conversion is byte-identical to the iOSDemo's
reference af_heart.bin.KokoroNoise.mlmodelc/model.mil is patched (weights unchanged); noise-phase-fix.json
marks the fixed revision. The conversion spelled atan2 as atan(im/re) plus quadrant
terms with no case for im == 0, re < 0, so the DC and Nyquist STFT bins of the harmonic
source got phase 0 where torch.angle gives +π, and it replaced the source's Gaussian
noise (noise_amp × N(0, 1)) with a constant. Together these lifted 5–10 kHz by up to
2.8 dB against the MLX port. The fix makes the +π branch take im >= 0 and restores the
draw with random_normal (seed −1: the same draw on every load, so output stays
deterministic). Measured in Vox's VoiceBench (16 cells × 3 takes, M1 Pro): the long-term
spectrum is within 0.1 dB of MLX Kokoro from 160 Hz to 10 kHz (was 2.8 dB), centroid
+2 Hz (was +195 Hz). The previous revision is e16ab079.
KokoroNoise.mlmodelc is rebuilt from kokoro-v1_0.safetensors with the phase fix and
the noise draw built in; noise-stage-v2.json marks this revision. The harmonic source and
the STFT stay fp32; the noise branch (convs, Snake, AdaIN) is fp16, and the weights are not
palettized. The stage runs on the CPU in about half the time (33 ms against 72–76 ms for a
370-frame input, M1 Pro). VoiceBench: every quality budget passes, as with the patched stage;
time to first audio p50 dropped 35% in a paired A/B. The previous revision is 3ddd693.
American: af_alloy, af_aoede, af_bella, af_heart, af_jessica, af_kore, af_nicole, af_nova, af_river, af_sarah, af_sky, am_adam, am_echo, am_eric, am_fenrir, am_liam, am_michael, am_onyx, am_puck, am_santa. British: bf_alice, bf_emma, bf_isabella, bf_lily, bm_daniel, bm_fable, bm_george, bm_lewis.
Model weights and voices: Apache-2.0 (hexgrad/Kokoro-82M).
Core ML conversion: Apache-2.0 (laishere/kokoro-coreml, © 2026 laishere).
Voice pack conversion scripted in Vox: scripts/generate-ane-voice-packs.py.