Kokoro TTS

A local implementation of the Kokoro Text-to-Speech system, based on the Kokoro-82M model.

Features

  • High-quality English text-to-speech synthesis
  • Multiple voice styles
  • Adjustable speech speed
  • Local inference without internet dependency (after initial model download)
  • Automatic espeak-ng installation using espeakng-loader

Prerequisites

  • Python 3.8 or higher
  • Git LFS (for model download)

Installation

  1. Set up Python environment:
# Create and activate virtual environment
python -m venv venv
.\venv\Scripts\activate  # Windows
source venv/bin/activate  # Linux/Mac

# Install dependencies
pip install -r requirements.txt

The espeakng-loader package will automatically handle the installation of espeak-ng.

Project Structure

  • tts_demo.py - Demo script showing basic usage
  • models.py - Model implementation and utilities
  • requirements.txt - Python dependencies

Usage

Run the demo script:

python tts_demo.py

This will:

  1. Automatically install espeak-ng if needed
  2. Download the Kokoro model
  3. Generate a sample audio file

Credits

License

Apache-2.0 License (following the original model's license)

Description
No description provided
Readme 3.4 MiB
Languages
Python 92%
Shell 4.2%
PowerShell 3.8%