Install Kokoro 82M TTS with Conda
Introduction
Kokoro is an open-weight TTS model with 82 million parameters. Despite its lightweight architecture, it delivers comparable quality to larger models while being significantly faster and more cost-efficient. With Apache-licensed weights, Kokoro can be deployed anywhere from production environments to personal projects.
GitHub: https://github.com/hexgrad/kokoro
Hugging Face: https://hf.co/hexgrad/Kokoro-82M
Demo: https://hf.co/spaces/hexgrad/Kokoro-TTS
Prerequisites
System requirements:
- Operating System: Windows 10/11 (64-bit), macOS, or Linux (Debian/Ubuntu).
- Python: version >= 3.10 required
- Disk Space: 10GB+ recommended (for dependencies and model cache). At least 400 MB for Miniconda; 3 GB+ for full Anaconda.
- The GPU is optional but HIGHLY Recommended for Performance.
- Internet: For downloading dependencies and models from Hugging Face Hub.
| Requirements | CPU | RAM |
|---|---|---|
| Minimum | Intel Core i3 or AMD Ryzen 3 | 8 GB |
| Recommended | Intel Core i5 or AMD Ryzen 5 | 16 GB |
| High-performance | Intel Core i7/i9 or AMD Ryzen 7/9 | 32 GB |
| Environment | Run this Command | Architecture |
|---|---|---|
| CPU only | pip3 install torch torchvision |
IA-32 and Intel 64 |
| Apple Silicon | pip3 install torch torchvision |
|
| AMD ROCm | Install PyTorch for ROCm | |
| CUDA 11.8 | pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118 |
Kepler/Maxwell → Ada Lovelace, Hopper |
| CUDA 12.1 | pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121 |
Kepler/Maxwell → Ada Lovelace, Hopper |
| CUDA 12.4 | pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu124 |
Kepler/Maxwell → Ada Lovelace, Hopper |
| CUDA 12.6 | pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu126 |
Maxwell → Hopper |
| CUDA 12.8 | pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu128 |
Volta → Blackwell |
| CUDA 12.9 | pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu129 |
Volta → Blackwell |
| CUDA 13.0 | pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu130 |
Turing → Blackwell |
| CUDA 13.2 | pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu132 |
Turing → Blackwell |
| CUDA 13.4 | pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu134 |
Turing → Blackwell |
PyTorch Available versions:
pip index versions torch
pip index versions torchaudio
pip index versions torchvision
pip index versions torch --index-url https://download.pytorch.org/whl/cu118
pip index versions torchaudio --index-url https://download.pytorch.org/whl/cu118
pip index versions torchvision --index-url https://download.pytorch.org/whl/cu118| Environment | 2.15.0 | 2.14.1 | 2.14.0 | 2.13.0 | 2.12.1 | 2.12.0 | 2.11.0 | 2.10.0 | 2.9.1 | 2.9.0 | 2.8.0 | 2.7.1 | 2.7.0 | 2.6.0 | 2.5.1 | 2.5.0 | 2.4.1 | 2.4.0 | 2.3.1 | 2.3.0 | 2.2.2 | 2.2.1 | 2.2.0 | 2.1.2 | 2.1.1 | 2.1.0 | 2.0.1 | 2.0.0 | 1.13.1 | 1.13.0 | 1.12.1 | 1.12.0 | 1.11.0 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| cpu | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| cu118 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ||||||||||||||||
| cu121 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | |||||||||||||||||||||
| cu124 | ✅ | ✅ | ✅ | ✅ | ✅ | ||||||||||||||||||||||||||||
| cu126 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ||||||||||||||||||||
| cu128 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ||||||||||||||||||||||||||
| cu129 | ✅ | ✅ | |||||||||||||||||||||||||||||||
| cu130 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ||||||||||||||||||||||||
| cu132 | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | |||||||||||||||||||||||||||
| cu134 | ✅ |
Video tutorial
Step 1. Install Miniconda Package
Download Miniconda: https://www.anaconda.com/download/success?reg=skipped
Direct link: https://anaconda.com/api/installers/Miniconda3-latest-Windows-x86_64.exe
Direct link: https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-arm64.exe
How to Install Miniconda on Windows
Step 2. Install eSpeak NG
The library needs espeak-ng (Required for Windows) for text-to-phoneme conversion. On Windows:
- Go to espeak-ng releases
- Click on Latest release
- Download the appropriate .msi file (e.g., espeak-ng.msi)
- Run the downloaded installer
- Follow the installation wizard
For detailed Windows configuration, see the official espeak-ng Windows guide
Step 3. Create Conda Environment
Create a conda environment:
name: kokoro
channels:
- defaults
dependencies:
- python==3.10
- pip:
- kokoro>=0.9.4
- soundfile
- misaki[en]Activate conda environment:
conda env create -f environment.yml
conda activate kokoroStep 4. Create a Python Script
Create a file named kokoro_test.py:
from kokoro import KPipeline
import soundfile as sf
# Initialize pipeline (American English)
pipeline = KPipeline(lang_code='a')
# Your text
text = "Hello, this is Kokoro text to speech on Windows!"
# Generate audio
generator = pipeline(text, voice='af_heart')
# Save audio files
for i, (gs, ps, audio) in enumerate(generator):
print(f"Part {i}: {gs}")
sf.write(f'output_{i}.wav', audio, 24000)Run it:
python kokoro_test.pyThe result will be the audio file output_0.wav


