Hacker NewsWednesday · July 8, 2026FREE

Local, CPU-Friendly, High-Quality TTS (Text-to-Speech) with Kokoro

ttskokoroopenai-compatiblecpuprivacy

Kokoro is a text-to-speech model with 82 million parameters that generates realistic speech in multiple languages including English, Mandarin, and Hindi. It provides around 50 distinct voices, primarily optimized for English. The model can run entirely on CPU, as demonstrated on a machine where the GPU is reserved for LLM inference. The simplest way to set up a server is using the Kokoro-FastAPI container image, which includes pre-downloaded voice models and is about 5 GB in size. The container can be launched with Docker or Podman and serves a web UI at localhost:8880/web for testing. It also provides an API compatible with the OpenAI speech API, allowing easy integration with existing programs. Sample code in JavaScript and Python is available on GitHub. Generation speed was measured on a short test paragraph: Intel Core i7-4770K took 4.7 seconds, Apple M2 Pro took 4.5 seconds, and AMD Ryzen 7 8745HS took 1.5 seconds. An alternative containerized TTS service called Speaches is also mentioned, which includes Whisper for speech-to-text but requires downloading voice weights separately.

// why it matters

Developers can run high-quality TTS locally on CPU, preserving privacy and enabling offline voice applications.

Sources

Primary · Hacker News
▸ Read original at ariya.io

Like this? Get the next digest.