# Kokoro

Kokoro is an 82M-parameter text-to-speech model that produces natural-sounding speech on a CPU. Despite the small size it handles English, Mandarin, and Hindi, and ships around 50 voices (mostly English). The weights and voices live on Hugging Face as [hexgrad/Kokoro-82M](https://huggingface.co/hexgrad/Kokoro-82M); the `hexgrad/kokoro` repo is the Python inference library. Ariya Hidayat's [how-to](https://ariya.io/2026/03/local-cpu-friendly-high-quality-tts-text-to-speech-with-kokoro/) covers the fastest way to get it running.

## Why it's interesting

It runs fast enough on old, GPU-less hardware to be practical. Hidayat's numbers for a short paragraph with the `am_eric` voice, best of three runs: a 12-year-old Intel Core i7-4770K did it in 4.7 seconds, an Apple M2 Pro in 4.5, and an AMD Ryzen 7 8745HS in 1.5. That leaves the GPU free for LLM inference — pair Kokoro on the CPU with a local model on the GPU and you can listen to answers instead of reading them. This is the same local-first argument [[titit-local-ai]] makes for LLMs, applied to speech, and the TTS counterpart to [[ghost-pepper]]'s local Whisper speech-to-text.

## Running it

The quickest path is the pre-built [Kokoro-FastAPI](https://github.com/remsky/Kokoro-FastAPI) container, which bundles the voice models (so the image is around 5 GB):

```bash
podman run -p 8880:8880 ghcr.io/remsky/kokoro-fastapi-cpu
```

It serves a web UI at `localhost:8880/web` for a quick check, and — more usefully — an HTTP interface compatible with the OpenAI speech API, so existing OpenAI-TTS code works against it by pointing at the local base URL. Select a voice with the `TTS_VOICE` environment variable (e.g. `am_eric`); the full list is in the model's [VOICES.md](https://huggingface.co/hexgrad/Kokoro-82M/blob/main/VOICES.md).

For a stack that also does speech-to-text, [Speaches](https://speaches.ai/) is another OpenAI-compatible container that adds Whisper STT alongside TTS. Unlike Kokoro-FastAPI it doesn't bundle voice weights — you download them through its API — but it's a single service for both directions.

## Limitations

Short utterances are the weak spot. Asked to say a bare word like "six", Kokoro tends to pad it ("ah-six-ah"); the model's small size is the reason. The practical workaround is to feed it a full sentence ("The word is: six"), then crop the audio using the per-word timestamps the API returns — reliable, if a little flat in intonation. Users also report the male voices lag the better female ones in quality, and SSML / fine inflection control is limited. For homographs it accepts inline IPA pronunciation hints, which covers the common mispronunciation cases.

Kokoro's language coverage is fixed; for languages it doesn't support (Dutch, for instance) you're back to larger, slower models. People wanting voice cloning or finer emotional control tend to reach for other small models — Pocket TTS, Supertonic, Chatterbox — but for plain, fast, private narration Kokoro is the common default, and it has been ported widely (WASM/WebGPU in the browser, CoreML and the Apple Neural Engine, ONNX).

8,030 stars, Apache-2.0 license. Repo: https://github.com/hexgrad/kokoro
