NeuML / kokoro-base-onnx

huggingface.co
Total runs: 0
24-hour runs: 0
7-day runs: 0
30-day runs: 0
Model's Last Updated: March 21 2025
text-to-speech

Introduction of kokoro-base-onnx

Model Details of kokoro-base-onnx

Kokoro Base (82M) Model for ONNX

Kokoro 82M export to ONNX. This model is the same ONNX file that's in the base repository. The voices file is from this repository .

Usage with txtai

txtai has a built in Text to Speech (TTS) pipeline that makes using this model easy.

Note: This requires txtai >= 8.3.0. Install from GitHub until that release.

import soundfile as sf

from txtai.pipeline import TextToSpeech

# Build pipeline
tts = TextToSpeech("NeuML/kokoro-base-onnx")

# Generate speech
speech, rate = tts("Say something here")

# Write to file
sf.write("out.wav", speech, rate)
Usage with ONNX

This model can also be run directly with ONNX provided the input text is tokenized. Tokenization can be done with ttstokenizer . ttstokenizer is a permissively licensed library with no external dependencies (such as espeak).

Note that the txtai pipeline has additional functionality such as batching large inputs together that would need to be duplicated with this method.

import json
import numpy as np
import onnxruntime
import soundfile as sf

from ttstokenizer import IPATokenizer

# This example assumes the files have been downloaded locally
with open("kokoro-base-onnx/voices.json", "r", encoding="utf-8") as f:
    voices = json.load(f)

# Create model
model = onnxruntime.InferenceSession(
    "kokoro-base-onnx/model.onnx",
    providers=["CPUExecutionProvider"]
)

# Create tokenizer
tokenizer = IPATokenizer()

# Tokenize inputs
inputs = tokenizer("Say something here")

# Get speaker array
speaker = np.array(self.voices["af"], dtype=np.float32)

# Generate speech
outputs = model.run(None, {
    "tokens": [[0, *inputs, 0]],
    "style": speaker[len(inputs)],
    "speed": np.ones(1, dtype=np.float32) * 1.0
})

# Write to file
sf.write("out.wav", outputs[0], 24000)
Speaker reference

The Kokoro model has a number of built-in speakers.

When using this model, set a speaker id from the reference table below.

SPEAKER GENDER NATIONALITY EXAMPLE
af F American Link
af_bella F American Link
af_nicole F American Link
af_sarah F American Link
af_sky F American Link
am_adam M American Link
af_michael M American Link
bf_emma F British Link
bf_isabella F British Link
bm_george M British Link
bm_lewis M British Link

The following shows an example on how to set a speaker id when using txtai

speech, rate = tts("Say something here", speaker="af_sky")

Runs of NeuML kokoro-base-onnx on huggingface.co

0
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
0
30-day runs

More Information About kokoro-base-onnx huggingface.co Model

More kokoro-base-onnx license Visit here:

https://choosealicense.com/licenses/apache-2.0

kokoro-base-onnx huggingface.co

kokoro-base-onnx huggingface.co is an AI model on huggingface.co that provides kokoro-base-onnx's model effect (), which can be used instantly with this NeuML kokoro-base-onnx model. huggingface.co supports a free trial of the kokoro-base-onnx model, and also provides paid use of the kokoro-base-onnx. Support call kokoro-base-onnx model through api, including Node.js, Python, http.

kokoro-base-onnx huggingface.co Url

https://huggingface.co/NeuML/kokoro-base-onnx

NeuML kokoro-base-onnx online free

kokoro-base-onnx huggingface.co is an online trial and call api platform, which integrates kokoro-base-onnx's modeling effects, including api services, and provides a free online trial of kokoro-base-onnx, you can try kokoro-base-onnx online for free by clicking the link below.

NeuML kokoro-base-onnx online free url in huggingface.co:

https://huggingface.co/NeuML/kokoro-base-onnx

kokoro-base-onnx install

kokoro-base-onnx is an open source model from GitHub that offers a free installation service, and any user can find kokoro-base-onnx on GitHub to install. At the same time, huggingface.co provides the effect of kokoro-base-onnx install, users can directly use kokoro-base-onnx installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

kokoro-base-onnx install url in huggingface.co:

https://huggingface.co/NeuML/kokoro-base-onnx

Url of kokoro-base-onnx

kokoro-base-onnx huggingface.co Url

Provider of kokoro-base-onnx huggingface.co

NeuML
ORGANIZATIONS

Other API from NeuML

huggingface.co

Total runs: 1.9K
Run Growth: 1.6K
Growth Rate: 84.98%
Updated:January 27 2025
huggingface.co

Total runs: 1.1K
Run Growth: -170
Growth Rate: -16.18%
Updated:January 27 2025
huggingface.co

Total runs: 1.0K
Run Growth: 199
Growth Rate: 19.19%
Updated:February 21 2023
huggingface.co

Total runs: 853
Run Growth: 250
Growth Rate: 29.31%
Updated:February 21 2023
huggingface.co

Total runs: 521
Run Growth: -99.9K
Growth Rate: -19182.34%
Updated:January 27 2025
huggingface.co

Total runs: 285
Run Growth: 98
Growth Rate: 34.39%
Updated:January 27 2025
huggingface.co

Total runs: 186
Run Growth: 113
Growth Rate: 62.78%
Updated:April 21 2026
huggingface.co

Total runs: 31
Run Growth: 14
Growth Rate: 45.16%
Updated:October 10 2025
huggingface.co

Total runs: 15
Run Growth: -2
Growth Rate: -13.33%
Updated:November 23 2024
huggingface.co

Total runs: 8
Run Growth: -75
Growth Rate: -937.50%
Updated:April 13 2026
huggingface.co

Total runs: 8
Run Growth: 2
Growth Rate: 25.00%
Updated:July 21 2026
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:November 11 2025