Downloads · 30 days
298
34% of all-time downloads
owensong/chatterbox-nano-ONNX
chatterbox-nano-ONNX is a text-to-speech model from owensong. Use it when you need text read aloud. It is set up for onnxruntime. The card lists the license as mit.
Community ONNX conversion of ResembleAI/chatterbox-nano, packaged for ONNX Runtime and custom browser applications using ONNX Runtime Web.
Downloads · 30 days
298
34% of all-time downloads
All-time downloads
870
Public
Repo size
570 MB
Likes
7
Public
Click a slice to open those files.
.onnx_data566 MB · 99%
From the Hugging Face model README
Community ONNX conversion of ResembleAI/chatterbox-nano, packaged for ONNX Runtime and custom browser applications using ONNX Runtime Web.
This is an independent conversion. It is not an official Resemble AI release.
The four-graph ONNX pipeline has run end to end in local tests. Evaluation is currently limited to development smoke tests, not a representative speech-quality benchmark.
This repository does not publish WER, PESQ, STOI, speaker-similarity, MOS, latency, or real-time-factor claims. We have not evaluated enough speakers, prompts, reference recordings, devices, or random seeds to report those metrics responsibly.
The package is non-streaming. It generates speech tokens autoregressively and then synthesizes the complete waveform in one acoustic-decoder call. Experimental chunked-streaming graphs are intentionally excluded.
These checks establish that the conversion can execute. They do not establish general speech quality, speaker similarity, robustness, or performance.
Treat this repository as a functional conversion that still needs broader evaluation before production use.
The model is split into four ONNX sessions:
| Stage | Graph | Published profile |
|---|---|---|
| Text/speech-token embedding | onnx/embed_tokens_fp16.onnx | FP16 embedding weights |
| Reference speech encoder | onnx/speech_encoder_q4f16.onnx | INT4 weight quantization with FP16 activations |
| Autoregressive speech-token model | onnx/language_model_q4f16.onnx | INT4 weight quantization with FP16 activations and KV cache |
| Acoustic decoder and vocoder | onnx/conditional_decoder_q4.onnx | INT4 weight quantization with FP32 activations |
Each large graph uses an external tensor-data file. Keep every .onnx_data file beside its corresponding .onnx file. The complete repository is approximately 547 MiB.
The quantization labels describe how these files were produced. They are not quality claims and do not imply equivalent output to the original checkpoint for every input.
Special token IDs used by the included runner:
| Purpose | Token ID |
|---|---|
| Start speech | 6561 |
| Stop speech | 6562 |
| Decoder silence padding | 4299 |
Using the Hugging Face CLI:
hf download owensong/chatterbox-nano-ONNX \
--local-dir chatterbox-nano-ONNX
Using Python:
from huggingface_hub import snapshot_download
model_dir = snapshot_download(
repo_id="owensong/chatterbox-nano-ONNX",
local_dir="chatterbox-nano-ONNX",
)
print(model_dir)
Use SHA256SUMS to verify downloaded files when reproducibility matters.
The included run_onnx.py demonstrates the complete four-session pipeline. It is a reference implementation, not a production inference server.
Create an environment:
python -m venv .venv
Activate it and install the pinned smoke-test dependencies:
# Windows PowerShell
.venv\Scripts\Activate.ps1
pip install -r requirements.txt
# Linux or macOS
source .venv/bin/activate
pip install -r requirements.txt
Provide a voice reference you are authorized to use, then run:
python run_onnx.py \
--model . \
--voice reference.wav \
--output output.wav \
--text "Hello. This is Chatterbox Nano running through ONNX Runtime." \
--dtype q4f16 \
--provider cpu \
--max-new-tokens 256 \
--seed 1337
The runner resamples the reference to 24 kHz, executes the four graphs, and writes a mono WAV. Generated output varies because speech-token generation samples from the model unless --greedy is supplied.
For CUDA, install a version of onnxruntime-gpu compatible with your CUDA environment instead of the CPU-only onnxruntime dependency. CUDA execution of this published package has not been systematically validated.
These are raw ONNX component graphs, not a self-contained web application. A browser integration must provide:
The repository is not directly compatible with a generic pipeline() call. ONNX Runtime Web operator support also varies by browser and GPU. Successful execution on one RTX 3060 system should not be interpreted as a compatibility or speed guarantee for other hardware.
Chatterbox Nano's published acoustic path is not an incremental streaming decoder. This conversion therefore waits for speech-token generation and performs a full acoustic synthesis pass.
Do not market this package as streaming or suitable for low-latency voice-agent use without replacing or retraining the acoustic path and validating the resulting model. Concatenating independently decoded chunks can introduce pauses, discontinuities, and inconsistent prosody.
The conversion process used the official Turbo ONNX package as a graph reference for shared speech components and applied the Nano-specific dimensions and conditioning weights required by this checkpoint.
Upstream Chatterbox documentation describes Nano as an English text-to-speech model with voice conditioning and paralinguistic tags. Those upstream capabilities should not be confused with independent validation of this ONNX conversion.
Only synthesize or clone a person's voice with authorization. Users are responsible for complying with applicable privacy, publicity, copyright, impersonation, disclosure, and consent requirements. Synthetic audio should not be represented as authentic human speech when doing so could mislead listeners.
The upstream Chatterbox project and model are released under the MIT License. See LICENSE and NOTICE.md. Chatterbox and the original model weights are attributed to Resemble AI. This repository provides independent ONNX conversion and packaging work.