YAML Metadata Warning: empty or missing yaml metadata in repo card (https://huggingface.co/docs/hub/model-cards#model-card-metadata)

How to run Kokoro TTS locally

Please note that this is the same 32fp file taken from

https://huggingface.co/onnx-community/Kokoro-82M-v1.0-ONNX/tree/main/onnx

Download all the files to a local directory model_dir

Load Kokoro Model

from kokoro_onnx import Kokoro

kokoro = Kokoro("kokoro-v1.0.onnx", "voices-v1.0.bin")  # 32fp

Convert Phonemes to Wav File

The following will save a wave file to model_dir Output is 16bit so that it can be easily used by TTS evaluation framework.

# Assuming phonemes are already produced 
import soundfile as sf
samples, sample_rate = kokoro.create(phonemes, "af_bella", is_phonemes=True)
sf.write("phonemes_test.wav", samples, sample_rate, subtype='PCM_16')
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support