Kokoro

by hexgrad
Open

Converts text into speech using a locally runnable synthesis model and a selection of predefined voices.

Description

Kokoro is an 82-million-parameter speech synthesis model with a Python interface for local inference. It accepts text and produces synthesized audio that can be saved as WAV files. The library lets users select a predefined voice, language and speaking speed, and split longer text into segments. Documented languages include English, Spanish, French, Italian, Hindi, Japanese, Brazilian Portuguese and Mandarin Chinese. Developers can integrate the model into a text reader, narration interface or automated media workflow. For instance, an application can generate audio for each paragraph of an article and save the clips for later assembly. The code and weights are available under Apache 2.0 without a mandatory subscription. Installation requires Python and phonemization dependencies, with extra configuration for certain languages. Russian and German are not on the documented language list; third-party API services have their own pricing.