kamilobad/Kokoro-82M-CoreML-INT8
Kokoro-82M CoreML INT8
End-to-end CoreML export of hexgrad/Kokoro-82M with INT8 k-means palettization, optimized for Apple Neural Engine. Requires iOS 18+ / macOS 15+.
A single kokoro_5s.mlmodelc runs the full pipeline (BERT → duration prediction → fixed-shape alignment → prosody → decoder) in one CoreML call. G2P (grapheme-to-phoneme) is a separate pair of CoreML models.
Model
Files
Quality
Compared to the FP16 reference export on a reference 1-second utterance (af_heart voice, 14 phonemes) using the same CoreML inference path:
Because CoreML k-means palettization is not deterministic (scikit-learn's k-means is unseeded), different exports land at different losses. This checkpoint was picked from the best of multiple export runs.
Voices
54 preset voices across 10 languages: English (US/UK), Spanish, French, Hindi, Italian, Japanese, Korean, Portuguese, Chinese.
Usage
Add speech-swift to Package.swift:
.package(url: "https://github.com/soniqo/speech-swift", branch: "main")Then synthesize:
import KokoroTTS
let tts = try await KokoroTTSModel.fromPretrained(
modelId: "aufklarer/Kokoro-82M-CoreML-INT8"
)
let audio = try await tts.synthesize(
"Hello world, this is a Kokoro test.",
voice: "af_heart"
)CLI:
swift run audio kokoro "Hello world" --voice af_heart --output out.wavSource
- Base model: hexgrad/Kokoro-82M (Apache-2.0)
- Dictionaries and G2P: Apache-2.0
License
- Model weights: Apache-2.0
- CoreML conversion: Apache-2.0
Links
- speech-swift — Apple SDK
- soniqo.audio — website
- MLX vs CoreML on Apple Silicon — a practical guide — related blog post
- soniqo.audio/blog — blog
