HeadlinesBriefing favicon HeadlinesBriefing.com

Kokoro TTS runs locally on CPU

Hacker News •
×

Kokoro, a text-to-speech (TTS) model with 82M parameters, now offers high-quality, private speech synthesis entirely on local CPUs. Despite a previous machine's GPU being reserved for LLM inference, Kokoro delivered realistic audio across languages like English, Mandarin, and Hindi, featuring approximately 50 distinct voices, mostly for English.

The model is accessible via a 5GB container image, Kokoro-Fast API, which includes pre-downloaded voice models. This setup allows easy deployment with Docker or Podman, exposing a web UI at localhost:8880 and an API compatible with the Open AI speech API. Sample JavaScript and Python scripts demonstrate integration, allowing users to generate audio files and automatically play them if SoX is installed.

Performance benchmarks show that even an older Intel Core i7-4770K can generate speech in under 5 seconds for a short paragraph. Newer CPUs like the AMD Ryzen 7 8745 HS achieve this in just 1.5 seconds. For users needing both TTS and Speech-to-Text (STT), Speaches offers an alternative containerized solution, bundling OpenAI's Whisper STT system, though it requires separate voice weight downloads.