kokoro-coreml
A Swift package that runs the Kokoro-82M text-to-speech model on Core ML, across the Neural Engine, GPU and CPU, with a command-line demo and a Swift API. Speed figures are the author's own, and there are no tagged releases yet.
View on GitHub ↗- Stars
- ★ 81
- Last commit
- 4 Dec 2026
- Maintenance
- Active
- Licence
- Apache-2.0
- Category
- On-device AI SDKs
- GitHub
- mattmireles/
kokoro-coreml
Overview
kokoro-coreml converts Kokoro-82M, an open text-to-speech model, to run on Apple devices through Core ML. It uses the Neural Engine, GPU or CPU, produces 24 kHz mono audio and runs entirely on the device after the first model download. For a quick try there is a command-line tool, kokoro-say. Apps can use the KokoroTTS library product.
The README quotes speed, memory and thermal figures. They are the author's own measurements on specific hardware, and several are marked as upper bounds, so treat them as a guide and test on your own devices. There are no tagged SDK releases, so pin a commit.
kokoro-coreml is licensed under the Apache License 2.0.
Features
- Kokoro-82M text-to-speech on Core ML, using the Neural Engine, GPU and CPU.
- KokoroTTS.load(resources: .huggingFace()) to download and load a starter bundle (about 210 MB, checked against a SHA-256 hash).
- synthesize with a voice such as .afHeart to produce speech, and makePCMBuffer() to play it with AVAudioEngine.
- A kokoro-say command-line tool.
- Output at 24 kHz mono.
Requirements
- iOS 18 or macOS 15 or later, with Xcode 26 or later (Swift 6.2).
- An Apple Silicon Mac or recent iPhone. watchOS is not supported.
- Network access for the first download.
Install
Try it first: swift run -c release kokoro-say "Hello from the Neural Engine." (this downloads the starter bundle).
To use it in an app, add .package(url: "https://github.com/mattmireles/kokoro-coreml", revision: "<commit>") and the KokoroTTS product. Replace the commit placeholder with a commit you have checked.
Example
In a reading app, load the model once at launch, call synthesize for each paragraph, and play the result through the audio engine. One README code sample has a typo (K#okoroTTS), so copy from the product docs rather than that line.
Works with
Listed in
Read the code before you install anything. SwiftAgents doesn't review or endorse the tools listed here. Active: a commit in the last 90 days. Slowing: last commit within the past year. Stale: older than a year, or archived.
More in this category
apfel
Command-line tool, chat mode and local OpenAI-compatible server for the on-device model in Apple's FoundationModels framework. Needs macOS 26 and Apple silicon.
Argmax OSS Swift (WhisperKit)
Argmax's open-source on-device speech toolkit for Apple silicon, and the home of WhisperKit.
MLX Swift Examples
Example apps and code showing how to use MLX Swift.
SwiftAgents