onnxvoice
onnxvoice manages, verifies, stores, and executes ONNX voice-model assets through shared catalogs, a content-addressed cache, and a common Python API.
It is a model asset and runtime layer, not a complete text-to-speech frontend. Text normalization, G2P/phonemization, sentence planning, and higher-level voice policy belong to producer packages.
Install
The base package does not install ONNX Runtime. Install the provider extra for the target system:
python -m pip install onnxvoice
python -m pip install "onnxvoice[cpu]"
python -m pip install "onnxvoice[gpu]"
python -m pip install "onnxvoice[directml]"
python -m pip install "onnxvoice[openvino]"
ONNX Runtime distributions (the Python build providing onnxruntime) are separate from execution providers (such as CUDA or CPU). Inspect the current build and select ONNXVoice's default policy with:
onnxvoice runtime
onnxvoice runtime list
onnxvoice runtime use auto
runtime use changes only future ONNXVoice sessions; it does not install or switch runtime packages. See provider setup for precedence and Python API controls.
KittenTTS 2 text normalization and tokenization are optional: install onnxvoice[kitten2] with a runtime extra such as onnxvoice[kitten2,cpu]. The native runtime does not depend on the separate kitten2-onnx package. See KittenTTS 2.
Hugging Face is an optional download transport, separate from runtime selection: use onnxvoice[huggingface] for transport only, or onnxvoice[cpu,huggingface] for CPU inference plus Hub downloads. Pocket users can continue using the compatible onnxvoice[pocket] extra (and add a runtime provider, e.g. onnxvoice[pocket,cpu]). See Pocket download setup.
Voicefolio owns cataloging, discovery, and download of reference WAVs. OnnxVoice's Pocket support is for ONNX bundles and predefined runtime voice states. See Pocket download setup.
Quick start
CLI
onnxvoice list --kind voice --lang en-US
onnxvoice install piper:en_US-lessac-medium
onnxvoice installed
onnxvoice cache info
Reclaim cache space
onnxvoice cache info --details
onnxvoice cache gc --dry-run
onnxvoice installed --sort size --desc
onnxvoice remove REF --dry-run --gc
onnxvoice remove REF --gc
blobs/sha256 is ONNXVoice's verified content-addressed artifact store. Installation views normally hard-link to shared blobs, with copies used when hard links are unavailable, so blob size and installation logical size must not be added to estimate disk usage. Use ONNXVoice's cache and removal commands rather than deleting blobs/ manually; unknown cache paths are reported but are never garbage-collected. The retired pocket-voice-prompts/ path can be previewed or removed only with onnxvoice cache gc --include-legacy.
ONNXVoice provides the shared asset-management CLI for Qwen3-TTS and other supported systems:
onnxvoice list --system qwen3
onnxvoice install qwen3:base-0.6b --quality int4
onnxvoice install qwen3:voice-design-1.7b --quality int4
onnxvoice info qwen3:base-0.6b --quality int4
onnxvoice path qwen3:base-0.6b --quality int4
onnxvoice verify qwen3:base-0.6b --quality int4
onnxvoice installed
onnxvoice cache info
Install progress is written to stderr. Successful install stdout contains only the installed path; use --no-progress to disable progress output. ONNXVOICE_CACHE_DIR selects the shared model and catalog cache root, and the global --cache-dir option overrides it. Ctrl+C prints Cancelled. to stderr and exits with status 130 after cleaning staging data; an existing usable installation is preserved.
Python
from onnxvoice import OnnxVoice
voice = OnnxVoice()
installation = voice.install("piper:en_US-lessac-medium")
runtime = voice.open(installation, provider="cpu")
try:
# Supply model-ready token IDs from your frontend.
result = runtime.infer([1, 20, 14, 5, 2])
print(result.audio.shape, result.sample_rate)
finally:
runtime.close()
install() acquires catalog assets. open() uses an existing managed installation and does not download assets. open_local() opens explicit files without copying or registering them.
Supported systems
| System | Built-in adapter | Catalog | Named voices |
|---|---|---|---|
| Piper | Yes | Yes | Yes |
| Kokoro | Yes | Yes | Yes |
| Yes | Yes | Catalog-dependent | |
| Supertonic | Yes | Yes | Yes |
| Kitten | Yes | Yes | Yes |
| KittenTTS 2 | Yes | Yes | Catalog child voices |
| Inflect | Yes | Yes | Fixed default voice |
| Sopro | Yes (partial) | Yes | Zero-shot reference audio |
| Qwen3-TTS | Yes | Yes | No; VoiceDesign/Base bundles |
| Chatterbox | Yes | Yes | Zero-shot reference audio |
| Phonon | Yes | Yes | Catalog-declared projected prompts |
Sopro currently provides bundle management, graph inspection, tokenization, and reference preparation only. End-to-end Python synthesis remains capability-gated pending the real native-runtime and parity gate; see Sopro support. Catalog contents determine which named voices are available. Discovery does not depend on a separate capability list. Adapters execute system-specific model contracts and do not imply text normalization or phonemization support.
Phonon targets, qualities, voices, synthesis languages, and license metadata are discovered dynamically from the configured bundle catalog. Availability can evolve independently of ONNXVoice; use the CLI/API discovery commands to inspect the current catalog. See the Phonon runtime guide for the low-level token-ID-to-streaming-PCM contract and licensing details.
Documentation
The full documentation includes task-oriented CLI and Python guides, storage and update behavior, provider setup, local-model workflows, per-system runtime contracts, and the API reference.
See Qwen3-TTS WaveKat for the model-specific API and bundle contract.
See Chatterbox for its supported bundles, profiles, and runtime boundary.
See Phonon for its token-ID/PCM boundary, catalog-driven availability, local opening, and model-license distinctions.
Development
python -m pip install -e ".[dev,cpu]"
pytest -q
python docs/make.py html
License
The source code is Apache-2.0. Downloaded models, voices, and model cards retain their own licenses and terms. Installing an asset through onnxvoice does not relicense it.
Metadata
Release files for onnxvoice 0.2.17
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| onnxvoice-0.2.17.tar.gz | 2.1 MB | Without provenance | Details for onnxvoice-0.2.17.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| onnxvoice-0.2.17-py3-none-any.whl | Python 3 | none | any | Details for onnxvoice-0.2.17-py3-none-any.whl |
Total release size: 2.4 MB
Release files / onnxvoice-0.2.17.tar.gz
| Download URL | onnxvoice-0.2.17.tar.gz |
|---|---|
| Size | 2.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
aa0d37330e36ff88419ac9bbc0add5a3ddb339f7d8b93e6861b62d9e89a723ef
|
|
BLAKE2b-256 checksum How to use checksums |
6720703d1fff5ac6963b5d3f3b0690813b5345111fb82834769ce000dc863074
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Release files / onnxvoice-0.2.17-py3-none-any.whl
| Download URL | onnxvoice-0.2.17-py3-none-any.whl |
|---|---|
| Size | 326.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7e7a2296250722a4a9d90613c8b2549168f487a0ce8f1c488f9b31c266e1236f
|
|
BLAKE2b-256 checksum How to use checksums |
618f2a4bc65bfb7450245ed18fbd958b965b0381d79472cbb0b895bb65cd9a45
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Security for onnxvoice 0.2.17
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.