lucasjinreal/Kokoros

🔥🔥 Kokoro in Rust. https://huggingface.co/hexgrad/Kokoro-82M Insanely fast, realtime TTS with high quality you ever have.

What it solves

Kokoros is a high-performance Rust implementation of the Kokoro TTS model, designed to provide extremely fast text-to-speech synthesis with high-quality audio output. It eliminates the need for heavy Python dependencies by providing a standalone binary and a Rust crate for easy integration into other applications.

How it works

The project uses the Kokoro 82M parameter model via ONNX Runtime to perform inference. It includes a built-in phonemizer and tokenizer (supporting Espeak-ng) to handle text processing end-to-end. The system can be used as a command-line tool (koko), a Rust library, or an OpenAI-compatible HTTP API server that supports streaming audio generation and parallel processing to optimize throughput.

Who it’s for

  • Developers wanting to embed high-quality TTS in Rust applications.
  • Users seeking a fast, lightweight CLI tool for audio synthesis.
  • Engineers building AI agents or digital humans that require low-latency, streaming audio responses.

Highlights

  • Insanely Fast Inference: Optimized for speed in Rust, with support for CUDA and WASM.
  • OpenAI Compatible: Provides an API server that mimics the OpenAI TTS endpoint for easy integration.
  • Streaming Support: Supports both CLI and HTTP API streaming for immediate audio playback (low time-to-first-audio).
  • Style Mixing: Allows blending different voice styles (e.g., af_sky.4 + af_nicole.5) for custom voice effects.
  • Word-level Timestamps: Can generate .tsv sidecar files providing precise start and end times for each word.
  • End-to-End: Includes internal phonemization, removing the need for external dependencies.

Related

  • Dispatch
  • Project
  • Project
  • Project
  • Project