mirror of
https://github.com/PierrunoYT/Kokoro-TTS-Local.git
synced 2025-01-27 02:30:25 +03:00
43fe8396291590cb5388575fd6efb6d143d7a86d
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
- 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 usagemodels.py- Model implementation and utilitiesrequirements.txt- Python dependencies
Usage
Run the demo script:
python tts_demo.py
This will:
- Automatically install espeak-ng if needed
- Download the Kokoro model
- Generate a sample audio file
Credits
- Original model: hexgrad/Kokoro-82M
- espeak-ng loader: espeakng-loader
- Based on papers:
License
Apache-2.0 License (following the original model's license)
Description
Languages
Python
92%
Shell
4.2%
PowerShell
3.8%