Skip to main content
Choose Kokoro for a small, single-GPU speech service with preset voices. The checkpoint synthesizes text or precomputed phonemes and returns 24 kHz audio.

Install and start

Text input needs Python 3.12 for the misaki pronunciation packages. On Python 3.13 or later, send precomputed phonemes. For English, install the spaCy tagger before starting.

kokoro

Text → audio. The default kokoro.yaml uses 1 GPU. The weights use Apache-2.0.
Send the request.

Send a request

Run either client example in a second terminal after /health returns 200.

Synthesize a sentence

Save the synthesized speech as reply.wav. Python SDK
Use client.voices() to list names, or mix two with voice="af_bella+af_sky". For voice applications, the LiveKit Agents example and Pipecat example stream PCM from the server through their OpenAI TTS plugins. curl

Deployment configs

To use an alternative, pass --config configs/<file> after the launcher name. From a wheel installation, copy the shipped YAML and pass its local path.

Settings and defaults

Request fields (on /v1/audio/speech the non-OpenAI ones go in extra_body): Install misaki[ja]>=0.9.4 for Japanese or misaki[zh]>=0.9.4 for Mandarin. Install misaki[en]>=0.9.4 for the English espeak-ng fallback. Without that fallback, Kokoro can skip English words outside its pronunciation dictionary. Deployment model_kwargs (see the comments in configs/kokoro.yaml):

Limits

  • Text input only. An empty voice or lang_code, or a speed outside 0.25 to 4.0, is a 400.
  • Text synthesis with a missing G2P package returns HTTP 400.
  • Text is cut at sentence boundaries into chunks of at most 510 phonemes, the PL-BERT window.
  • temperature and top_p are ignored: Kokoro does not sample.
  • With the default compile_decoder: true, the first start on a GPU compiles the vocoder; see Cold start.