PyKokoro Documentation
PyKokoro is a request-centric Kokoro speech-synthesis engine. It accepts prepared speech requests and returns independent rendered waveforms. Parsing, speech planning, document semantics, timeline composition, and final-output mastering belong to the calling application and its other tools.
Contents:
- Quick start
- Installation
- Basic usage
- Advanced request features
- Voice enrollment
- Short-sentence synthesis
- Request lifecycle
- API reference
- Examples
- Languages and model profiles
- Breaking change: request-centric synthesis (v0.10.0)
- Changelog
- [0.10.4] - Unreleased
- [0.10.3] - 2026-10-04
- [0.10.2] - 2026-10-01
- [0.10.1] - 2026-09-29
- [0.10.0] - 2026-09-25
- [0.9.10] - 2026-09-17
- [0.9.9] - 2026-09-15
- [0.9.8] - 2026-09-14
- [0.9.7] - 2026-09-13
- [0.9.6] - 2026-09-13
- [0.9.5] - 2026-09-11
- [0.9.4] - 2026-09-11
- [0.9.3] - 2026-09-11
- [0.9.2] - 2026-09-10
- [0.9.1] - 2026-09-05
- [0.9.0] - 2026-09-04
- [0.8.8] - 2026-09-01
- [0.8.7] - Unreleased
- [0.8.6] - 2026-08-23
- [0.8.5] - 2026-08-15
- [0.8.4] - 2026-08-15
- [0.8.3] - 2026-08-06
- [0.8.2] - 2026-08-05
- [0.8.1] - 2026-08-04
- [0.8.0] - 2026-08-01
- [0.7.4] - 2026-07-30
- [0.7.2] - 2026-07-29
- [0.7.1] - 2026-07-28
- [0.7.0] - 2026-07-27
- [0.6.5] - 2026-02-11
- [0.6.4] - 2026-01-31
- [0.6.3] - 2026-01-28
- [0.6.2] - 2026-01-27
- [0.6.1] - 2026-01-25
- [0.6.0] - 2026-01-25
- [0.5.1] - 2026-01-23
- [0.5.0] - 2026-01-23
- [0.4.0] - 2026-01-17
- [0.3.0] - 2026-01-14
- [0.2.0] - 2026-01-11
- [0.1.0] - 2026-01-07
Engine responsibilities
KokoroG2P prepared-text integration with explicit pronunciation languages, source-aligned overrides, and linguistic tokens
Kokoro voice, model, and style selection, including blends
Model token-capacity validation and opt-in sentence-level splitting for oversized requests, plus ONNX inference
Request-local timing reconstruction, waveform validation, tracing, and optional voice calibration
Independent
RenderedSegmentresults and standalone WAV writing
Feature guides
[Direct phonemes, language routing, VoiceBlend, and result metadata] (advanced_features.md)
Frontends, installed lexicons, cache location, and asset progress
PyKokoro does not parse SSMD or YAML, create UtterPlans or AudioJobs, compose separate caller requests, insert cross-request silence, or apply document-level effects. The v0.10.0 breaking boundary and migration examples are described in the release note.
Quick example
from pykokoro import GenerationConfig, KokoroSynthesizer, SynthesisConfig
config = SynthesisConfig(
voice="af_sarah",
generation=GenerationConfig(lang="en-us"),
)
with KokoroSynthesizer(config) as synthesizer:
result = synthesizer.synthesize_text("Hello, world.", language="en-us")
result.save_wav("hello.wav")
See the maintained examples for requests with pronunciation context, linguistic tokens, and independent batch results.