Text-to-Speech-TTS-ONNX: A Multi-Model ONNX Export and Inference Kit for TTS and Voice Cloning
Utilizes ONNX Runtime for TTS model.
At a glance
- What is it?
- This repository bundles exporters, inference scripts, and optimization targets for a dozen TTS, voice cloning, and vocoder models, all running on ONNX Runtime. The core judgment: it is a practical integration layer for engineers who need ONNX artifacts, but the performance claims and model coverage come with caveats.
- Who is it for?
- Adopt this repository if you need to convert one of the listed TTS or voice cloning models into ONNX format and run it with ONNX Runtime in a Python environment. It suits engineers who want a pre-built export pipeline and a consistent audio I/O contract across multiple models.
- Can I use it commercially?
- Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 11 days ago.
- What is it written in?
- Mainly Python, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on October 22, 2026, and from our analysis. They are not legal advice.
Star history
- DakeQQ/Text-to-Speech-TTS-ONNX69 ★ · +0
| Repository | 2026-08-24 | 2026-10-22 |
|---|---|---|
| DakeQQ/Text-to-Speech-TTS-ONNX | 69 | 69 |
0 Stars in the last 59 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
What This Repository Actually Provides
The audio contract is a central design element. Exporters set public audio I/O with IN_SAMPLE_RATE, OUT_SAMPLE_RATE, IN_AUDIO_DTYPE, and OUT_AUDIO_DTYPE. Some models, like KaniTTS and BigVGAN, only expose output settings. Audio tensors support F16, F32, and INT16, with floating point using [-1, 1] and INT16 using PCM amplitude. Resampling is done inside the ONNX graph via torch.nn.functional.interpolate. This means the exported model handles sample rate conversion internally, which simplifies the inference side. The Metadata.onnx file stores the fixed package contract, and the inference script validates metadata, graph layout, and referenced files. This is a concrete mechanism that reduces runtime surprises, but it also means you must keep the metadata and scripts in sync.
The Audio I/O Contract and Its Constraints
The streaming exporters have a specific requirement: each codec or latent frame must map to a whole number of output samples. This is a hard constraint that affects which models can be streamed and how. If you plan to use streaming, you need to check the per-model script to see if it satisfies this condition. The README does not list which models are streaming-capable, so you will have to inspect the code. This is a genuine limitation because it adds an extra verification step before you can rely on streaming output.
How to Get It Running: Export, Inference, and Optimize Scripts
The inference scripts handle mode-dependent inputs. For example, F5-TTS requires prompt audio, while Inflect and KaniTTS do not. FireRedTTS3, MOSS-TTS Nano, Qwen3-TTS, and VoxCPM 2 are mode-dependent, meaning the input structure changes based on the mode you select. This adds complexity: you cannot assume a uniform inference API across models. The README states that mode-dependent inputs are configured in the inference script, so you will need to edit or pass parameters specific to each model.
Performance Numbers: What the RTF Table Does and Does Not Tell You
The precision column shows that quantized models (q8f32, q4f32) are used for CPU runs, and f16 for GPU. This suggests the Optimize script can produce quantized versions. However, the README does not explain how quantization affects quality. You will need to test that yourself. The table also does not report memory usage, which can be a deciding factor for deployment on limited hardware.
Limitations and Wrong Use Cases
The performance table reveals that some models are extremely slow on CPU. F5-TTS with RTF 60 is not practical for real-time use on a laptop CPU. If your deployment target is CPU-only and you need low latency, this repository may not help for heavy models like F5-TTS or FireRedTTS3. The RTF for FireRedTTS3 on CPU is 5.2, which is still above real-time (RTF > 1 means slower than real-time). Only a few models achieve RTF below 1 on CPU, like KaniTTS with q4f32 at 0.87. So choose your model carefully based on your hardware.
Alternatives: What Else Exists in the ONNX TTS Space
A third alternative is to use a commercial TTS API, which abstracts away all the export and inference complexity. That is the right choice if you do not need on-premise deployment or custom voice cloning. But if you need to run models locally, this repository offers a way to do that with ONNX. The RTF numbers suggest that GPU is almost required for usable performance with most models, so factor that into your decision.
Maintenance, License, and Upgrade Considerations
The Optimize scripts suggest that quantization is a supported workflow, but the README does not document the exact optimization flags. You will need to read the scripts to understand what they do. The performance table includes q8f32 and q4f32, which are likely int8 and int4 quantized models, but the precision naming is not standard. This adds a learning curve. The repository is a working example, not a polished product. It is useful as a reference for how to export these specific models to ONNX, but you should expect to invest time in understanding the code before you can rely on it.
Editorial conclusion
Adopt this repository if you need to convert one of the listed TTS or voice cloning models into ONNX format and run it with ONNX Runtime in a Python environment. It suits engineers who want a pre-built export pipeline and a consistent audio I/O contract across multiple models. Do not use it if you need production-grade streaming, non-English support beyond the listed models, or if you expect plug-and-play deployment without reading the per-model scripts. Before committing, verify the exact model version and precision you need, check the RTF numbers against your hardware, and confirm that the required prompt audio or reference text formats match your use case. The repository is a code collection, not a maintained library, so plan to fork and adapt.
Frequently asked questions
What is a text-to-speech tool used for?
For generating audio from text, and in the cloning and design variants, from a reference clip as well. This repository holds export, inference and optimize scripts that turn such models into ONNX format so they can run on ONNX Runtime.
Which TTS models in this repository run without reference audio?
Six entries. The neural vocoder takes mel spectrogram input, and two text-to-speech models take text directly. Four others require prompt audio, four mark it optional, and five are mode-dependent.
How do I choose a model from the performance table?
By real-time factor, which is synthesis time divided by audio duration with lower being better. The fastest CPU entry reaches 0.87 at four-bit precision, having been 1.4 at eight-bit, while others on the same processor range up to 60.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/dakeqq-text-to-speech-tts-onnx)Star history chart for your README
[](https://hysenlabs.com/projects/dakeqq-text-to-speech-tts-onnx)