PierrunoYT/Kokoro-TTS-Local

A local implementation of the Kokoro Text-to-Speech model, featuring dynamic module loading, automatic dependency management, and a web interface.

What it solves

Kokoro-TTS-Local provides a streamlined, local implementation of the Kokoro-82M text-to-speech model. It eliminates the need for complex manual setup by automating model and voice downloads from Hugging Face and providing easy-to-use interfaces for generating high-quality speech offline.

How it works

The project wraps the Kokoro-82M model (an 82M parameter model) and provides several ways to interact with it:

  • Interfaces: It offers an interactive Command Line Interface (CLI) and a Gradio-based web interface for text input and voice selection.
  • Asset Management: It automatically handles the downloading of the model file (kokoro-v1_0.pth) and configuration files. It also supports a dedicated offline mode via the HF_HUB_OFFLINE environment variable.
  • Processing: The system supports 54 voices across 9 languages, including American and British English, Japanese, Mandarin Chinese, and others. It can output audio in WAV, MP3, and AAC formats.
  • Hardware Acceleration: It supports CUDA-compatible GPUs for faster generation, while remaining functional on CPUs.

Who it’s for

Users who want to run high-quality text-to-speech synthesis locally on their own hardware for privacy, offline access, or integration into other local AI workflows, without relying on on-device cloud APIs.

Highlights

  • Multilingual Support: 54 voices across 9 different languages.
  • Offline Capability: Full offline mode support after initial asset download.
  • User-Friendly Interfaces: Includes both a web UI and a CLI.
  • Comprehensive Diagnostics: A built-in kokoro-tts-check tool to validate Python versions, CUDA availability, and dependencies.
  • Flexible Output: Support for multiple audio formats (WAV, MP3, AAC) and adjustable speech speed (0.5x to 2.0x).
  • Docker Support: Quick start via Docker for CPU-based setups.

Related

  • Dispatch
  • Project
  • Project
  • Project
  • Project