Skip to page content
SAVRN
Search Plan a project

Open-weight model · Text to speech

Kokoro-82M-CoreAI

by Richard R. richardr1126/Kokoro-82M-CoreAI

Kokoro-82M-CoreAI is an open-weight model for text to speech from Richard R., released under Apache License 2.0. Its published files total 350.2 MB.

Kokoro-82M (StyleTTS2 + iSTFTNet) exported to Apple's Core AI.aimodel format for iOS 27 and macOS 26. Built for OpenReader iOS, an on-device document reader.

Parameters—
Context—
Weights350.2 MB
Licenseapache-2.0
AccessOpen weights
Monthly Downloads—

Model Card

By Richard R., published under apache-2.0, revision 1cc012a27b55.

Kokoro-82M (StyleTTS2 + iSTFTNet) exported to Apple's Core AI.aimodel format for iOS 27 and macOS 26. Built for OpenReader iOS, an on-device document reader. Published because the export differs from the community recipe in one way that matters, and because a working Core AI TTS export was hard enough to arrive at that it is worth not repeating. Three fixed-shape bundles with two host steps between them. Kokoro's acoustic graph has exactly one data-dependent length — the duration-to-alignment expansion L = sum(preddur) — so the model is cut where that length appears rather than being made dynamic. Token bucket 128, frame bucket 512 — one pass renders 12.8 s of audio. Fixed buckets are not a…

Read Richard R.'s full model card

Kokoro-82M (StyleTTS2 + iSTFTNet) exported to Apple's Core AI .aimodel format for iOS 27 and macOS 26.

Built for OpenReader iOS, an on-device document reader. Published because the export differs from the community recipe in one way that matters, and because a working Core AI TTS export was hard enough to arrive at that it is worth not repeating.

What is here

Three fixed-shape bundles with two host steps between them. Kokoro's acoustic graph has exactly one data-dependent length — the duration-to-alignment expansion L = sum(pred_dur) — so the model is cut where that length appears rather than being made dynamic.

text --(misaki G2P, host)--> phoneme ids

1. kokoro_predictor.aimodel
     in   input_ids[1,128] int32, ref_s[1,256], attn_mask[1,128]
     out  duration[1,128], d[1,128,640], t_en[1,512,128]

   host   pred_dur = round(duration).clamp(min=1)
          alignment one-hot aln[1,128,512]; frame_mask[1,512]

2. kokoro_prosody.aimodel
     in   d, t_en, aln, ref_s, frame_mask
     out  asr[1,512,512], F0[1,512], N[1,512]

   host   f0_upsamp -> SineGen -> STFT  =>  har[1,22,512]   (fp32; see below)

3. kokoro_vocoder.aimodel
     in   asr, F0, N, har, ref_s, frame_mask
     out  audio[1, 512*600]  (24 kHz)
bundle size
kokoro_predictor.aimodel 80 MB
kokoro_prosody.aimodel 36 MB
kokoro_vocoder.aimodel 204 MB

Token bucket 128, frame bucket 512 — one pass renders 12.8 s of audio. Fixed buckets are not a shortcut. nn.LSTM specialises its sequence length under torch.export; dynamic shapes fail.

What differs from the community recipe

The bidirectional LSTMs are not unrolled.

A fused bidirectional LSTM is wrong on right-padded input: the reverse pass starts inside the padding and accumulates state across it before reaching a real token. The usual fix is to unroll to 128 masked cells, which is correct and enormous — the unrolled predictor carries a 128-step loop in its graph, and specialisation cost tracks the program rather than the weights.

This export replaces the unroll with an exact rewrite. Gather the sequence through an index map that reverses the first n positions and leaves padding where it is, run a unidirectional LSTM, then gather back through the same map — the map is an involution, so the same indices undo it. Two lstm ops instead of 256 cells' worth of arithmetic.

Measured on a physical iPhone 15 Pro (A17 Pro), iOS 27.0, from an empty specialisation cache:

compute unit unrolled this export
CPU 96.6 s 58.7 s
GPU 69.8 s 35.0 s
Neural Engine 107.1 s 49.6 s

The vocoder is the control: it holds no LSTM, it is by far the largest bundle, and it moved 1.37 s → 1.31 s. The predictor, which carried the unroll, dropped 51%.

A second, smaller difference: an nn.LSTM must not be constructed inside the traced region. __init__ runs reset_parameters(), which puts aten.uniform in the exported graph and coreai-torch refuses to lower it. The export calls torch._VF.lstm directly with the weights that already exist.

Accuracy

Verified against upstream PyTorch Kokoro (KModel.forward_with_tokens) on the same kokoro-v1_0.pth weights:

text voice length magspec corr waveform corr
"Hello, world. This is a test of on device speech generation." af_heart 4.50 s 0.9994 0.9820
"Chapter One" af_heart 1.57 s 0.9994 0.9917
"The Metamorphosis" af_heart 1.82 s 0.9994 0.9896
"It was a bright cold day in April, and the clocks were striking thirteen." bm_george 5.25 s 0.9993 0.9824

Run it yourself:

uv run export_kokoro.py --out-dir . --verify --voice af_heart --text "..."

Checked on macOS with cpu_only, so this validates the exported graph. The Neural Engine computes in fp16 and has not been compared numerically.

Performance

One pass renders 12.8 s of audio, so anything faster than that beats realtime. Same device, per-model, excluding the host steps:

stage CPU GPU ANE
predictor 52.2 ms 125.2 ms 115.7 ms
prosody 21.2 ms 102.6 ms 91.7 ms
vocoder 1225.5 ms 2349.6 ms 1139.4 ms
pipeline 1299 ms 2577 ms 1347 ms
vs realtime 9.9× 5.0× 9.5×

The GPU is the best unit for loading and the worst for running. Since a unit is chosen once, at specialisation, the useful assignment picks per stage:

stage unit cold inference
predictor CPU 19.1 s 52.2 ms
prosody ANE 15.6 s 91.7 ms
vocoder ANE 1.5 s 1139.4 ms
36.1 s 1283 ms — 10.0× realtime

Second and subsequent loads are 1–4 ms; specialisation is cached per device and OS. Declining the GPU costs 1.1 s of first-launch time and doubles throughput.

SpecializationOptions takes a preferredComputeUnitKind per model, and these are three separate bundles, so the split above is expressible directly.

Notes for anyone using these

  • The host steps are yours to write. Alignment between stages 1 and 2 is a one-hot expansion; between 2 and 3 it is f0_upsamp → SineGen → STFT. The SineGen phase accumulator needs fp32.
  • A short segment costs a full bucket. A two-word heading fills the same 512 frames as a long sentence and takes the same ~1.3 s. Batch short segments if you care.
  • Kokoro prepends a sentinel. Every segment carries roughly 0.45 s of leading sentinel audio. It is 9% of a five-second sentence and 29% of a 1.5-second heading, and it is not silence — the vocoder's upsampling smears the first phoneme backwards into it, so trimming durations[0] blindly will clip the first word. This is upstream behaviour, not an export artefact; it reproduces in PyTorch, which is why the correlations above stay at 0.9994.

Provenance

  • Weights: hexgrad/Kokoro-82M (kokoro-v1_0.pth), Apache-2.0.
  • Export recipe derived from coreai-model-zoo by John Rocky, modified as described above. export_kokoro.py is included.
  • Toolchain: coreai-core 1.0.0b2, coreai-torch 0.4.2, torch 2.9.0, Python 3.11.
  • G2P at inference time is misaki; it is not part of these bundles.

Reproduce with:

NATIVE_BILSTM=1 uv run export_kokoro.py --out-dir .

Without NATIVE_BILSTM=1 the script produces the unrolled variant.

Identity and Version

Repository
richardr1126/Kokoro-82M-CoreAI
Publisher
Richard R.
Task
Text to speech
Modality
Audio
Library
coreai
Parameters
Not stated by the source
Languages
en
Revision
1cc012a27b554199599767657140c1d3a871b083
First published
2026-09-22
Last updated
2026-09-23

Files and Weights

41 files, 350.2 MB in total.

Configuration5 files · 31.2 KB
Documentation1 file · 6.9 KB
Other34 files · 350.2 MB
Repository1 file · 1.7 KB
Every file
FileTypeSizeSHA-256
config.jsonConfiguration2.4 KB —
export_kokoro.pyConfiguration27.9 KB —
kokoro_predictor.aimodel/metadata.jsonConfiguration310 B —
kokoro_prosody.aimodel/metadata.jsonConfiguration310 B —
kokoro_vocoder.aimodel/metadata.jsonConfiguration310 B —
README.mdDocumentation6.9 KB —
kokoro_predictor.aimodel/main.hashOther32 B —
kokoro_predictor.aimodel/main.mlirbOther83.5 MB 8d0182cda6ef
kokoro_prosody.aimodel/main.hashOther32 B —
kokoro_prosody.aimodel/main.mlirbOther38.2 MB 527f930944db
kokoro_vocoder.aimodel/main.hashOther32 B —
kokoro_vocoder.aimodel/main.mlirbOther213.8 MB 89486fb75e9b
voices/af_alloy.npyOther522.4 KB 445ae1abcc61
voices/af_aoede.npyOther522.4 KB 3b7fbd4d3370
voices/af_bella.npyOther522.4 KB adf92f9d074c
voices/af_heart.npyOther522.4 KB 0212418aafaf
voices/af_jessica.npyOther522.4 KB 3d32685d7707
voices/af_kore.npyOther522.4 KB d8b0604fa03e
voices/af_nicole.npyOther522.4 KB d0c96b799c86
voices/af_nova.npyOther522.4 KB a7ec888221fe
voices/af_river.npyOther522.4 KB 06479b996415
voices/af_sarah.npyOther522.4 KB 04c3eff66b43
voices/af_sky.npyOther522.4 KB f0ad8d667e30
voices/am_adam.npyOther522.4 KB 836a3c058f93
voices/am_echo.npyOther522.4 KB 29ef1f5a8b48
voices/am_eric.npyOther522.4 KB 6498bf201f0f
voices/am_fenrir.npyOther522.4 KB 6940b7633234
voices/am_liam.npyOther522.4 KB 29e7499291d4
voices/am_michael.npyOther522.4 KB bbb62b3eae08
voices/am_onyx.npyOther522.4 KB 3f58ca8d3ef6
voices/am_puck.npyOther522.4 KB 836a9be38c29
voices/am_santa.npyOther522.4 KB 3368b44c6760
voices/bf_alice.npyOther522.4 KB be8e6bde8f2c
voices/bf_emma.npyOther522.4 KB 806fe5ac92bf
voices/bf_isabella.npyOther522.4 KB c8fb97c6bb59
voices/bf_lily.npyOther522.4 KB 6a7096cc0c97
voices/bm_daniel.npyOther522.4 KB e0a4dabcc539
voices/bm_fable.npyOther522.4 KB 343e09d7c16f
voices/bm_george.npyOther522.4 KB 7692b2123ac5
voices/bm_lewis.npyOther522.4 KB 1d8385549ec9
.gitattributesRepository1.7 KB —

License and Download

License
apache-2.0
Access
Open weights, no gate
Download from Richard R.

Released by Richard R. through its official repository on Hugging Face. Read the license.

Built From

Questions About Kokoro-82M-CoreAI

Can I use Kokoro-82M-CoreAI commercially?

Yes. Kokoro-82M-CoreAI is released under Apache License 2.0. The Apache License 2.0 is a permissive open-source license. It permits commercial use, modification and redistribution. It requires keeping the license and copyright notices and any NOTICE file, stating significant changes, and it includes an express patent grant from contributors.

Similar Models

Model · Text to speech

Kokoro-82M

Hexgrad

Kokoro is an open-weight TTS model with 82 million parameters. Despite its lightweight architecture, it delivers comparable quality to larger models while being significantly faster and more cost-efficient. With Apache-licensed weights, Kokoro can be deployed anywhere from production environments to personal projects. You can run this basic cell on Google Colab. Listen to samples. For more languages and details, see Advanced Usage. Under the hood, kokoro uses misaki, a G2P library at https://github.com/hexgrad/misaki Model SHA256 Hash: 496dba118d1a58f5f3db2efc88dbdc216e0483fc89fe6e47ee1f2c53f18ad1e4 Data: Kokoro was trained exclusively on permissive/non-copyrighted audio data and IPA…

Open weights apache-2.0

Model · Text to speech

audio.cpp-gguf

Audio.cpp

This directory contains audio.cpp-native GGUF conversions of multiple speech models. These files are intended for use with audio.cpp. If you enjoy the project, please star audio.cpp on GitHub and this Hugging Face repository. For conversion details, supported layouts, direct-file loading, sidecar embedding, and the latest compatibility notes, see the audio.cpp GGUF guide: - https://github.com/0xShug0/audio.cpp/blob/main/docs/gguf.md!!! Converted and quantized packages are checked with automated metrics, but perceived quality can still differ for human listeners. Please validate the exact package, backend, and route to confirm the output is acceptable for your use case. The table lists the…

Open weights other audio.cpp

Model · Text to speech

XTTS-v2

Coqui.ai

ⓍTTS is a Voice generation model that lets you clone voices into different languages by using just a quick 6-second audio clip. There is no need for an excessive amount of training data that spans countless hours. This is the same or similar model to what powers Coqui Studio and Coqui API. - Supports 17 languages. - Voice cloning with just a 6-second audio clip. - Emotion and style transfer by cloning. - Cross-language voice cloning. - Multi-lingual speech generation. - 24khz sampling rate. - 2 new languages; Hungarian and Korean - Architectural improvements for speaker conditioning. - Enables the use of multiple speaker references and interpolation between speakers. - Stability…

Open weights other coqui

Model · Text to speech

chatterbox

Resemble AI

Chatterbox Multilingual V3 is the latest general-purpose multilingual TTS model in the Chatterbox family. It keeps the same 0.5B model size while improving speaker similarity, reducing hallucinations, and producing more natural, conversational speech across languages. V3 is designed for broad language coverage like V2, but with stronger stability and more expressive generation. It is the recommended multilingual model for users who want one voice cloning model that works across many languages. Try it in the Chatterbox Multilingual TTS V3 Space. Alongside V3, we are releasing the Single Language Pack: dedicated finetunes for priority languages where tighter quality control, stronger…

Open weights mit chatterbox

Model · Text to speech

F5-TTS

Yushen CHEN

Download F5-TTS or E2 TTS and place under ckpts/ Paper: F5-TTS: A Fairytaler that Fakes Fluent and Faithful Speech with Flow Matching

Open weights cc-by-nc-4.0 f5-tts

Model · Text to speech

Kokoro-82M-v1.0-ONNX

ONNX Community

Kokoro is a frontier TTS model for its size of 82 million parameters (text in/audio out). First, install the kokoro-js library from NPM using: You can then generate speech as follows: Optionally, save the audio to a file: The model is resilient to quantization, enabling efficient high-quality speech synthesis at a fraction of the original model size.

Open weights apache-2.0 transformers.js