SAVRN
Search Contact SAVRN

Open-weight model · Text to speech

Kokoro-82M-v1.0-ONNX

by ONNX Community onnx-community/Kokoro-82M-v1.0-ONNX

Kokoro is a frontier TTS model for its size of 82 million parameters (text in/audio out).

Parameters
Context
Weights1.4 GB
Licenseapache-2.0
AccessOpen weights
Monthly Downloads739.9k

Model Card

By ONNX Community, published under apache-2.0, revision 1939ad2a8e41.

Kokoro is a frontier TTS model for its size of 82 million parameters (text in/audio out). First, install the kokoro-js library from NPM using: You can then generate speech as follows: Optionally, save the audio to a file: The model is resilient to quantization, enabling efficient high-quality speech synthesis at a fraction of the original model size.

Read ONNX Community's full model card

Kokoro TTS

Kokoro is a frontier TTS model for its size of 82 million parameters (text in/audio out).

Table of contents

  • Usage
  • JavaScript
  • Python
  • Voices/Samples
  • Quantizations

Usage

JavaScript

First, install the kokoro-js library from NPM using:

npm i kokoro-js

You can then generate speech as follows:

import { KokoroTTS } from "kokoro-js";

const model_id = "onnx-community/Kokoro-82M-ONNX";
const tts = await KokoroTTS.from_pretrained(model_id, {
  dtype: "q8", // Options: "fp32", "fp16", "q8", "q4", "q4f16"
});

const text = "Life is like a box of chocolates. You never know what you're gonna get.";
const audio = await tts.generate(text, {
  // Use `tts.list_voices()` to list all available voices
  voice: "af_bella",
});
audio.save("audio.wav");

Python

import os
import numpy as np
from onnxruntime import InferenceSession

# You can generate token ids as follows:
#   1. Convert input text to phonemes using https://github.com/hexgrad/misaki
#   2. Map phonemes to ids using https://huggingface.co/hexgrad/Kokoro-82M/blob/785407d1adfa7ae8fbef8ffd85f34ca127da3039/config.json#L34-L148
tokens = [50, 157, 43, 135, 16, 53, 135, 46, 16, 43, 102, 16, 56, 156, 57, 135, 6, 16, 102, 62, 61, 16, 70, 56, 16, 138, 56, 156, 72, 56, 61, 85, 123, 83, 44, 83, 54, 16, 53, 65, 156, 86, 61, 62, 131, 83, 56, 4, 16, 54, 156, 43, 102, 53, 16, 156, 72, 61, 53, 102, 112, 16, 70, 56, 16, 138, 56, 44, 156, 76, 158, 123, 56, 16, 62, 131, 156, 43, 102, 54, 46, 16, 102, 48, 16, 81, 47, 102, 54, 16, 54, 156, 51, 158, 46, 16, 70, 16, 92, 156, 135, 46, 16, 54, 156, 43, 102, 48, 4, 16, 81, 47, 102, 16, 50, 156, 72, 64, 83, 56, 62, 16, 156, 51, 158, 64, 83, 56, 16, 44, 157, 102, 56, 16, 44, 156, 76, 158, 123, 56, 4]

# Context length is 512, but leave room for the pad token 0 at the start & end
assert len(tokens) <= 510, len(tokens)

# Style vector based on len(tokens), ref_s has shape (1, 256)
voices = np.fromfile('./voices/af.bin', dtype=np.float32).reshape(-1, 1, 256)
ref_s = voices[len(tokens)]

# Add the pad ids, and reshape tokens, should now have shape (1, <=512)
tokens = [[0, *tokens, 0]]

model_name = 'model.onnx' # Options: model.onnx, model_fp16.onnx, model_quantized.onnx, model_q8f16.onnx, model_uint8.onnx, model_uint8f16.onnx, model_q4.onnx, model_q4f16.onnx
sess = InferenceSession(os.path.join('onnx', model_name))

audio = sess.run(None, dict(
    input_ids=tokens,
    style=ref_s,
    speed=np.ones(1, dtype=np.float32),
))[0]

Optionally, save the audio to a file:

import scipy.io.wavfile as wavfile
wavfile.write('audio.wav', 24000, audio[0])

Voices/Samples

Life is like a box of chocolates. You never know what you're gonna get.

Name Nationality Gender Sample
af_heart American Female
af_alloy American Female
af_aoede American Female
af_bella American Female
af_jessica American Female
af_kore American Female
af_nicole American Female
af_nova American Female
af_river American Female
af_sarah American Female
af_sky American Female
am_adam American Male
am_echo American Male
am_eric American Male
am_fenrir American Male
am_liam American Male
am_michael American Male
am_onyx American Male
am_puck American Male
am_santa American Male
bf_alice British Female
bf_emma British Female
bf_isabella British Female
bf_lily British Female
bm_daniel British Male
bm_fable British Male
bm_george British Male
bm_lewis British Male

Quantizations

The model is resilient to quantization, enabling efficient high-quality speech synthesis at a fraction of the original model size.

How could I know? It's an unanswerable question. Like asking an unborn child if they'll lead a good life. They haven't even been born.

Model Size (MB) Sample
model.onnx (fp32) 326
model_fp16.onnx (fp16) 163
model_quantized.onnx (8-bit) 92.4
model_q8f16.onnx (Mixed precision) 86
model_uint8.onnx (8-bit & mixed precision) 177
model_uint8f16.onnx (Mixed precision) 114
model_q4.onnx (4-bit matmul) 305
model_q4f16.onnx (4-bit matmul & fp16 weights) 154

Configuration

Model type
style_text_to_speech_2

Identity and Version

Repository
onnx-community/Kokoro-82M-v1.0-ONNX
Publisher
ONNX Community
Task
Text to speech
Modality
Audio
Library
transformers.js
Parameters
Not stated by the source
Languages
en
Revision
1939ad2a8e416c0acfeecc08a694d14ef25f2231
First published
2025-02-07
Last updated
2025-02-08

Files and Weights

68 files, 1.4 GB in total. The weights are 63 files totalling 1.4 GB in bin, onnx.

Weights63 files · 1.4 GB
Configuration1 file · 44 B
Tokenizer2 files · 3.6 KB
Documentation1 file · 10.6 KB
Repository1 file · 1.5 KB
Every file
FileTypeSizeSHA-256
onnx/model.onnxWeights325.5 MB 8fbea51ea711
onnx/model_fp16.onnxWeights163.2 MB ba4527a874b4
onnx/model_q4.onnxWeights305.2 MB 04cf570cf9c4
onnx/model_q4f16.onnxWeights154.6 MB d1a508a6a296
onnx/model_q8f16.onnxWeights86.0 MB 04c658aec1b6
onnx/model_quantized.onnxWeights92.4 MB fbae9257e1e0
onnx/model_uint8.onnxWeights177.5 MB 6607a397d77b
onnx/model_uint8f16.onnxWeights114.2 MB 883333e03c59
voices/af.binWeights524.3 KB a4f11d9d055a
voices/af_alloy.binWeights522.2 KB c4a6b876047f
voices/af_aoede.binWeights522.2 KB 4a004c334307
voices/af_bella.binWeights522.2 KB f69d836209b7
voices/af_heart.binWeights522.2 KB d583ccff3cdc
voices/af_jessica.binWeights522.2 KB a240a5e3c15b
voices/af_kore.binWeights522.2 KB 9be5221b6a94
voices/af_nicole.binWeights522.2 KB cd2191ab31b9
voices/af_nova.binWeights522.2 KB 18778272caa0
voices/af_river.binWeights522.2 KB 00a2bcf82b1d
voices/af_sarah.binWeights522.2 KB 4409fbc125af
voices/af_sky.binWeights522.2 KB 4435255c9744
voices/am_adam.binWeights522.2 KB 162b035ed91c
voices/am_echo.binWeights522.2 KB 3968b92c3c4c
voices/am_eric.binWeights522.2 KB e8b5be17edd1
voices/am_fenrir.binWeights522.2 KB c27989f741f7
voices/am_liam.binWeights522.2 KB 52403be32fd0
voices/am_michael.binWeights522.2 KB 1d1f21dd8da3
voices/am_onyx.binWeights522.2 KB da5d135b4241
voices/am_puck.binWeights522.2 KB fcf73c989033
voices/am_santa.binWeights522.2 KB 61150cf726ab
voices/bf_alice.binWeights522.2 KB 08afa6ba24da
voices/bf_emma.binWeights522.2 KB 669fe0647f9d
voices/bf_isabella.binWeights522.2 KB 3754352c4aaa
voices/bf_lily.binWeights522.2 KB 5e0ee32ebe64
voices/bm_daniel.binWeights522.2 KB 6b3194bbceff
voices/bm_fable.binWeights522.2 KB f88908319680
voices/bm_george.binWeights522.2 KB c4b235a4c1f2
voices/bm_lewis.binWeights522.2 KB b8f671cef828
voices/ef_dora.binWeights522.2 KB f66ec66bd295
voices/em_alex.binWeights522.2 KB 27809e9eafdc
voices/em_santa.binWeights522.2 KB ad43b774e1ca
voices/ff_siwis.binWeights522.2 KB a35f5675ad08
voices/hf_alpha.binWeights522.2 KB 040be6a44254
voices/hf_beta.binWeights522.2 KB cd83ae0bb9b2
voices/hm_omega.binWeights522.2 KB b02d9222d9ed
voices/hm_psi.binWeights522.2 KB 644daf88ba8a
voices/if_sara.binWeights522.2 KB 409b69248798
voices/im_nicola.binWeights522.2 KB bc578e510d52
voices/jf_alpha.binWeights522.2 KB 56b479360aad
voices/jf_gongitsune.binWeights522.2 KB 0f1181f3772d
voices/jf_nezumi.binWeights522.2 KB 13cb71eebb0b
voices/jf_tebukuro.binWeights522.2 KB 29c6c0561b42
voices/jm_kumo.binWeights522.2 KB 09e959d23972
voices/pf_dora.binWeights522.2 KB 3da7b5b2d918
voices/pm_alex.binWeights522.2 KB 0175c753f59c
voices/pm_santa.binWeights522.2 KB 8b012db31857
voices/zf_xiaobei.binWeights522.2 KB 5dde6e1c9c4f
voices/zf_xiaoni.binWeights522.2 KB 08892b62a39a
voices/zf_xiaoxiao.binWeights522.2 KB 03adb5d5e3dd
voices/zf_xiaoyi.binWeights522.2 KB bc1555c5c486
voices/zm_yunjian.binWeights522.2 KB de48a00bdbf3
voices/zm_yunxi.binWeights522.2 KB 7243892fb4e5
voices/zm_yunxia.binWeights522.2 KB 6b2b8fc15b3d
voices/zm_yunyang.binWeights522.2 KB 261e2c894705
config.jsonConfiguration44 B
README.mdDocumentation10.6 KB
.gitattributesRepository1.5 KB
tokenizer.jsonTokenizer3.5 KB
tokenizer_config.jsonTokenizer113 B

License and Download

License
apache-2.0
Access
Open weights, no gate
Download size
1.4 GB
Download from ONNX Community

Released by ONNX Community through its official repository on Hugging Face. Read the license.

Built From

Memory Requirements

PrecisionWeights in memory
As published1.4 GB

Weights only, from the published parameter count; the key-value cache and runtime add to this.

Questions About Kokoro-82M-v1.0-ONNX

Can I use Kokoro-82M-v1.0-ONNX commercially?

Yes. Kokoro-82M-v1.0-ONNX is released under Apache License 2.0. The Apache License 2.0 is a permissive open-source license. It permits commercial use, modification and redistribution. It requires keeping the license and copyright notices and any NOTICE file, stating significant changes, and it includes an express patent grant from contributors.

Similar Models

Model · Text to speech

Kokoro-82M

Hexgrad

Kokoro is an open-weight TTS model with 82 million parameters. Despite its lightweight architecture, it delivers comparable quality to larger models while being significantly faster and more cost-efficient. With Apache-licensed weights, Kokoro can be deployed anywhere from production environments to personal projects. You can run this basic cell on Google Colab. Listen to samples. For more languages and details, see Advanced Usage. Under the hood, kokoro uses misaki, a G2P library at https://github.com/hexgrad/misaki Model SHA256 Hash: 496dba118d1a58f5f3db2efc88dbdc216e0483fc89fe6e47ee1f2c53f18ad1e4 Data: Kokoro was trained exclusively on permissive/non-copyrighted audio data and IPA…

Open weights apache-2.0

Model · Text to speech

XTTS-v2

Coqui.ai

ⓍTTS is a Voice generation model that lets you clone voices into different languages by using just a quick 6-second audio clip. There is no need for an excessive amount of training data that spans countless hours. This is the same or similar model to what powers Coqui Studio and Coqui API. - Supports 17 languages. - Voice cloning with just a 6-second audio clip. - Emotion and style transfer by cloning. - Cross-language voice cloning. - Multi-lingual speech generation. - 24khz sampling rate. - 2 new languages; Hungarian and Korean - Architectural improvements for speaker conditioning. - Enables the use of multiple speaker references and interpolation between speakers. - Stability…

Open weights other coqui

Model · Text to speech

audio.cpp-gguf

Audio.cpp

This directory contains audio.cpp-native GGUF conversions of multiple speech models. These files are intended for use with audio.cpp. If you enjoy the project, please star audio.cpp on GitHub and this Hugging Face repository. For conversion details, supported layouts, direct-file loading, sidecar embedding, and the latest compatibility notes, see the audio.cpp GGUF guide: - https://github.com/0xShug0/audio.cpp/blob/main/docs/gguf.md!!! Converted and quantized packages are checked with automated metrics, but perceived quality can still differ for human listeners. Please validate the exact package, backend, and route to confirm the output is acceptable for your use case. The table lists the…

Open weights other audio.cpp

Model · Text to speech

chatterbox

Resemble AI

Chatterbox Multilingual V3 is the latest general-purpose multilingual TTS model in the Chatterbox family. It keeps the same 0.5B model size while improving speaker similarity, reducing hallucinations, and producing more natural, conversational speech across languages. V3 is designed for broad language coverage like V2, but with stronger stability and more expressive generation. It is the recommended multilingual model for users who want one voice cloning model that works across many languages. Try it in the Chatterbox Multilingual TTS V3 Space. Alongside V3, we are releasing the Single Language Pack: dedicated finetunes for priority languages where tighter quality control, stronger…

Open weights mit chatterbox

Model · Text to speech

F5-TTS

Yushen CHEN

Download F5-TTS or E2 TTS and place under ckpts/ Paper: F5-TTS: A Fairytaler that Fakes Fluent and Faithful Speech with Flow Matching

Open weights cc-by-nc-4.0 f5-tts

Model · Text to speech

Qwen3-TTS-GGUF

Serveurperso

GGUF weights for qwentts.cpp, a C++17/GGML port of Qwen3-TTS 12 Hz (Qwen team, Alibaba). Multilingual zero shot TTS with named speakers and Mandarin dialects, 24 kHz mono. Runs on CPU, CUDA, Metal, Vulkan. qwen-talker-{size}-{mode}-{variant}.gguf Qwen3 LM + code predictor MTP head + optional speaker encoder, text -> 12 Hz codes qwen-tokenizer-12hz-{variant}.gguf SEANet + ConvNeXt + DAC v2 + RVQ, 12 Hz codes 24 kHz audio Three modes are available across two talker sizes: The tokenizer is shared across every talker. Set GGMLBACKEND to force a device, otherwise the runtime picks the best one available. Tokenizer GGUFs are not uniform quants. Three categories get a Conv kernel rows (K=7,3,1)…

Open weights apache-2.0 gguf