holos-tts-onnx
PyTorch-free inference for HolosTTS on ONNX Runtime: CPU, CUDA and TensorRT, with optional low-latency streaming.
Install
python -m pip install holos-tts-onnx # CPU and CUDA
python -m pip install "holos-tts-onnx[tensorrt]" # plus TensorRT
From a checkout of the repository, install ./holos_onnx instead. The import
name is holos_onnx.
On Linux and Windows this installs onnxruntime-gpu with its CUDA and cuDNN
libraries; on macOS it installs the CPU onnxruntime. The libraries come from
NVIDIA's pip packages, so no system CUDA or LD_LIBRARY_PATH setup is needed.
Python 3.9+ and ONNX Runtime 1.28+ are required.
Quick start
from holos_onnx import HolosTTS
model = HolosTTS() # the default bundle, patriotyk/HolosTTS/onnx
audio = model.generate(phonemes, voice=model.list_voices()[0], speed=1.0)
# float32 samples at model.sample_rate (24 kHz)
HolosTTS(model) loads a local bundle directory when that path exists.
Otherwise model names a Hugging Face model: owner/repo, optionally
followed by the bundle's folder in the repository, such as
patriotyk/HolosTTS/onnx. Only the bundle files are downloaded, into the
Hugging Face cache, so later runs work offline; revision, cache_dir and
token control the download.
The input is a phoneme string in the model's vocabulary; the Ukrainian text
frontend (stress marks and IPA conversion) is not part of this package, see
the repository README.
speed above one speaks faster, below one slower.
Models
| Model | Use |
|---|---|
patriotyk/HolosTTS/onnx |
FP32 for CPU, CUDA and TensorRT (the default). |
patriotyk/HolosTTS/onnx-int8 |
INT8 for CPU: about 1.5x faster than FP32 and half the download, sounds the same. |
GPU
model = HolosTTS(providers=["CUDAExecutionProvider"])
TensorRT uses the same default model. FP16 with a persistent engine cache is the fastest option:
model = HolosTTS(
providers=[(
"TensorrtExecutionProvider",
{
"trt_fp16_enable": True,
"trt_engine_cache_enable": True,
"trt_engine_cache_path": "trt_cache",
"trt_timing_cache_enable": True,
"trt_timing_cache_path": "trt_cache",
},
)],
)
The first load builds the engines, which takes a few minutes; later loads reuse
the cache. CUDA and CPU are added as fallbacks automatically. Each stage gets
its own TensorRT optimization profile from the bundle's manifest (2–512 tokens
and up to max_frames frames by default), and longer inputs are rejected
before inference.
Streaming
Load the model with streaming=True to get audio chunk by chunk:
model = HolosTTS("patriotyk/HolosTTS/onnx-int8", streaming=True)
for chunk in model.stream(phonemes, voice="my_voice"):
play(chunk)
Streaming uses a window decoder: each chunk of chunk_frames frames (40 by
default, 1 s of audio) is decoded with 20 frames of context on both sides, so
the chunks concatenate to the same audio as decoding the whole utterance. On
CPU the windows at the utterance edges are shorter, so the first chunk decodes
fewer frames; on GPU every window has the full width, since a new input shape
costs the CUDA provider more than the extra frames. The first chunk is ready
after about 5 ms with TensorRT FP16 on an RTX 3090, or about 200 ms in INT8 on
an Apple M2 CPU; see the
benchmarks. When the whole
phrase can be generated before playback, generate without streaming is
faster, since streaming decodes the context of every chunk again. stream
drops the boundary-token silence at the start (about 50 ms) except 10 ms and
fades in over 5 ms; pass trim_silence=False to keep it.
stream raises an error on a model loaded without streaming=True.
generate works in both modes and always returns the full utterance.
Bundle format
A bundle is a directory with holos_onnx.json (vocabulary, sample rate and
stage files), voices.npz (preset voice embeddings) and the stage graphs:
encoder.onnx: tokens → token features and integer durations;prosody.onnx: token features gathered per frame → F0 and energy;decoder.onnx: acoustic features, F0 and energy → audio of the whole utterance (default mode);source.onnxanddecoder_window.onnx(streaming mode): the harmonic excitation for the whole utterance, and the decoder for one window of it.
Only the files of the selected mode are downloaded and loaded. The runtime builds the frame-to-token index between stages, and every stage runs on the exact predicted length. Bundles from exporters older than the three-stage format are rejected.
Without session_options, the runtime disables ONNX Runtime's intra-op thread
spinning: the stages run one after another, and spinning threads of a finished
stage would slow the next one down on CPU.
Tests
python holos_onnx/tests/test_inference.py
python holos_onnx/tests/test_streaming_parity.py # needs the repository checkout
License
MIT, see LICENSE.
Metadata
Release files for holos-tts-onnx 0.4
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 |
|---|---|---|---|---|
| holos_tts_onnx-0.4.tar.gz | 19.4 kB | With provenance | Details for holos_tts_onnx-0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| holos_tts_onnx-0.4-py3-none-any.whl | Python 3 | none | any | Details for holos_tts_onnx-0.4-py3-none-any.whl |
Total release size: 32.7 kB
Release files / holos_tts_onnx-0.4.tar.gz
| Download URL | holos_tts_onnx-0.4.tar.gz |
|---|---|
| Size | 19.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
87ceb8c40a75d4e0437b8a50489015c2d3dfc778ba4928d767e22fd004a76da9
|
|
BLAKE2b-256 checksum How to use checksums |
f2e5625ac0f9cfeca274e7aa500d284e47724ff67a560b520afa4226dd52fb8a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.
Transparency logRelease files / holos_tts_onnx-0.4-py3-none-any.whl
| Download URL | holos_tts_onnx-0.4-py3-none-any.whl |
|---|---|
| Size | 13.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5aced3caa7f3454c0a0f12ca9ceb9750b695ce502a4360e3913a739b4dc2f621
|
|
BLAKE2b-256 checksum How to use checksums |
72c8e4f0f4b0f655432b220e324636377c7bdc87c083707eaf5362f6095d286d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.
Transparency logSecurity for holos-tts-onnx 0.4
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for holos_tts_onnx-0.4.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.
Transparency logA 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.