DakeQQ/Text-to-Speech-TTS-ONNX

Utilizes ONNX Runtime for TTS model.

71

stars

353

commits

Python

primary language

Sep 4, 2026

updated

README

Text-to-Speech-TTS-ONNX

License ONNX Runtime

English · Models · Performance
中文 · 模型 · 性能


English

Text-to-speech, voice cloning, voice design, and vocoding with ONNX Runtime.

Export and run TTS models using text and optional prompt audio. The repository contains export targets across the model families below, each with Export, Inference, and Optimize scripts.

The shared model table lists public ONNX audio rates. Exporters handle native-rate conversion, while mode-dependent inputs are configured in the inference script.

The shared performance table reports RTF, calculated as synthesis time divided by audio duration. Lower is better. Unless noted, tests use a six-second reference and generate about 15 words. BigVGAN uses a (1, 100, 512) mel input.

Audio Contract

  • Set public audio I/O with IN_SAMPLE_RATE, OUT_SAMPLE_RATE, IN_AUDIO_DTYPE, and OUT_AUDIO_DTYPE in each exporter; KaniTTS and BigVGAN expose output settings only.
  • Audio tensors support F16, F32, and INT16; floating point uses [-1, 1], while INT16 uses PCM amplitude.
  • Resampling runs inside the ONNX graph with torch.nn.functional.interpolate.
  • Metadata.onnx stores the fixed package contract; runtime controls remain in the inference script. Inference validates metadata, graph layout, and referenced files.
  • Streaming exporters require each codec or latent frame to map to a whole number of output samples.
  • Raon-OpenTTS is English-only in this package and requires reference audio with matching reference text.

中文

基于 ONNX Runtime 的语音合成、声音克隆、声音设计与神经声码器。

输入文本及可选提示音频即可导出并运行 TTS 模型。本项目包含下表所列模型家族的导出目标,每个目标均提供 ExportInferenceOptimize 脚本。

共用模型表列出公开 ONNX 音频采样率。导出脚本负责原生采样率转换,模式相关输入则在推理脚本中配置。

共用性能表中的 RTF 为合成耗时除以音频时长,数值越低越好。除特别注明外,测试使用六秒参考音频并生成约 15 个单词。BigVGAN 使用 (1, 100, 512) mel 输入。

音频约定

  • 在导出脚本中通过 IN_SAMPLE_RATEOUT_SAMPLE_RATEIN_AUDIO_DTYPEOUT_AUDIO_DTYPE 设置公开音频输入输出;KaniTTS 与 BigVGAN 仅提供输出设置。
  • 音频张量支持 F16F32INT16;浮点使用 [-1, 1]INT16 使用 PCM 幅值。
  • 重采样通过 torch.nn.functional.interpolate 在 ONNX 图内完成。
  • Metadata.onnx 保存固定模型包约定,运行时配置保留在推理脚本中。推理时会校验元数据、图布局与引用文件。
  • 流式导出要求每个编解码器帧或潜变量帧对应整数个输出采样点。
  • 本项目中的 Raon-OpenTTS 仅支持英文,并且需要带有匹配文本的参考音频。

Supported Models
支持的模型

Capability
能力
Model
模型
Audio I/O
音频输入输出
Prompt Audio
提示音频
Code
代码
Source
来源
Neural vocoder
神经声码器
BigVGAN V2Mel → 24 kHzNo
BigVGANGitHub
Voice cloning · voice design · voice direction
声音克隆 · 声音设计 · 语音指导
Breeze TTS 224 → 24 kHzMode-dependent
取决于模式
Breeze_TTS/v2GitHub
Voice cloning
声音克隆
F5-TTS24 → 24 kHzRequired
必需
F5_TTSGitHub
Clone · voice design · speech editing
克隆 · 声音设计 · 语音编辑
FireRedTTS324 → 24 kHzMode-dependent
取决于模式
FireRedTTS/v3GitHub
Voice cloning
声音克隆
IndexTTS 1.524 → 24 kHzSupported
支持
Index_TTS/v1.5GitHub
Voice cloning · emotion control
声音克隆 · 情感控制
IndexTTS 222.05 → 22.05 kHzSupported
支持
Index_TTS/v2GitHub
Voice cloning · emotion control
声音克隆 · 情感控制
IndexTTS 2.522.05 → 22.05 kHzSupported
支持
Index_TTS/v2GitHub
Text-to-speech
语音合成
InflectText → 24 kHzNo
InflectGitHub
Text-to-speech
语音合成
KaniTTSText → 22.05 kHzNo
Kani_TTSGitHub
Voice cloning · continuation
声音克隆 · 续写
MOSS-TTS Nano48 → 48 kHzMode-dependent
取决于模式
MOSS_TTSGitHub
Clone · custom voice · voice design
克隆 · 定制音色 · 声音设计
Qwen3-TTS24 → 24 kHzMode-dependent
取决于模式
Qwen_TTSGitHub
English voice cloning
英文声音克隆
Raon-OpenTTS-0.3B16 → 16 kHzRequired
必需
Raon_OpenTTSGitHub
English voice cloning
英文声音克隆
Raon-OpenTTS-1B16 → 16 kHzRequired
必需
Raon_OpenTTSGitHub
Voice cloning
声音克隆
VoxCPM 1.544.1 → 44.1 kHzSupported
支持
VoxCPM/v1.5ModelScope
Clone · continuation · voice design
克隆 · 续写 · 声音设计
VoxCPM 216 → 48 kHzMode-dependent
取决于模式
VoxCPM/v2ModelScope
Voice cloning · dialogue
声音克隆 · 对话
ZipVoice24 → 24 kHzRequired
必需
ZipVoiceGitHub

Performance
性能

OS
系统
Device
设备
Backend
后端
Model
模型
Precision
精度
Time (s)
耗时(秒)
RTF
Ubuntu 24.04Intel Core i7-1165G7CPUF5-TTS · NFE=32f3218060
Ubuntu 24.04NVIDIA GeForce MX150GPUF5-TTS · NFE=32f326221
Ubuntu 24.04Intel Core i7-1165G7CPUIndexTTSf32186
Ubuntu 24.04NVIDIA GeForce MX150GPUBigVGAN V2 24khz_100band_256xf164.61.53
Ubuntu 24.04Intel Core i7-1165G7CPUKaniTTSq8f328.41.4
Ubuntu 24.04Intel Core i7-1165G7CPUKaniTTSq4f325.20.87
Ubuntu 24.04Intel Core i3-12300CPUVoxCPM 1.5q8f3291.5
Ubuntu 24.04NVIDIA GeForce RTX 5060 TiGPUVoxCPM 1.5f161.030.17
Ubuntu 24.04Intel Core i3-12300CPUQwen3-TTS-0.6B-Baseq8f32193.1
Ubuntu 24.04Intel Core i3-12300CPUVoxCPM 2q8f32233.8
Ubuntu 24.04NVIDIA GeForce RTX 5060 TiGPUVoxCPM 2f162.050.34
Ubuntu 24.04Intel Core i7-1165G7CPUFireRedTTS3q8f3231.15.2

Text-to-Speech-TTS-ONNX · ONNX Runtime
github.com/DakeQQ

Contributors

DakeQQ

353 commits

DakeQQ/Text-to-Speech-TTS-ONNX

Utilizes ONNX Runtime for TTS model.

71

stars

353

commits

Python

primary language

Sep 4, 2026

updated

README

Text-to-Speech-TTS-ONNX

License ONNX Runtime

English · Models · Performance
中文 · 模型 · 性能


English

Text-to-speech, voice cloning, voice design, and vocoding with ONNX Runtime.

Export and run TTS models using text and optional prompt audio. The repository contains export targets across the model families below, each with Export, Inference, and Optimize scripts.

The shared model table lists public ONNX audio rates. Exporters handle native-rate conversion, while mode-dependent inputs are configured in the inference script.

The shared performance table reports RTF, calculated as synthesis time divided by audio duration. Lower is better. Unless noted, tests use a six-second reference and generate about 15 words. BigVGAN uses a (1, 100, 512) mel input.

Audio Contract

  • Set public audio I/O with IN_SAMPLE_RATE, OUT_SAMPLE_RATE, IN_AUDIO_DTYPE, and OUT_AUDIO_DTYPE in each exporter; KaniTTS and BigVGAN expose output settings only.
  • Audio tensors support F16, F32, and INT16; floating point uses [-1, 1], while INT16 uses PCM amplitude.
  • Resampling runs inside the ONNX graph with torch.nn.functional.interpolate.
  • Metadata.onnx stores the fixed package contract; runtime controls remain in the inference script. Inference validates metadata, graph layout, and referenced files.
  • Streaming exporters require each codec or latent frame to map to a whole number of output samples.
  • Raon-OpenTTS is English-only in this package and requires reference audio with matching reference text.

中文

基于 ONNX Runtime 的语音合成、声音克隆、声音设计与神经声码器。

输入文本及可选提示音频即可导出并运行 TTS 模型。本项目包含下表所列模型家族的导出目标,每个目标均提供 ExportInferenceOptimize 脚本。

共用模型表列出公开 ONNX 音频采样率。导出脚本负责原生采样率转换,模式相关输入则在推理脚本中配置。

共用性能表中的 RTF 为合成耗时除以音频时长,数值越低越好。除特别注明外,测试使用六秒参考音频并生成约 15 个单词。BigVGAN 使用 (1, 100, 512) mel 输入。

音频约定

  • 在导出脚本中通过 IN_SAMPLE_RATEOUT_SAMPLE_RATEIN_AUDIO_DTYPEOUT_AUDIO_DTYPE 设置公开音频输入输出;KaniTTS 与 BigVGAN 仅提供输出设置。
  • 音频张量支持 F16F32INT16;浮点使用 [-1, 1]INT16 使用 PCM 幅值。
  • 重采样通过 torch.nn.functional.interpolate 在 ONNX 图内完成。
  • Metadata.onnx 保存固定模型包约定,运行时配置保留在推理脚本中。推理时会校验元数据、图布局与引用文件。
  • 流式导出要求每个编解码器帧或潜变量帧对应整数个输出采样点。
  • 本项目中的 Raon-OpenTTS 仅支持英文,并且需要带有匹配文本的参考音频。

Supported Models
支持的模型

Capability
能力
Model
模型
Audio I/O
音频输入输出
Prompt Audio
提示音频
Code
代码
Source
来源
Neural vocoder
神经声码器
BigVGAN V2Mel → 24 kHzNo
BigVGANGitHub
Voice cloning · voice design · voice direction
声音克隆 · 声音设计 · 语音指导
Breeze TTS 224 → 24 kHzMode-dependent
取决于模式
Breeze_TTS/v2GitHub
Voice cloning
声音克隆
F5-TTS24 → 24 kHzRequired
必需
F5_TTSGitHub
Clone · voice design · speech editing
克隆 · 声音设计 · 语音编辑
FireRedTTS324 → 24 kHzMode-dependent
取决于模式
FireRedTTS/v3GitHub
Voice cloning
声音克隆
IndexTTS 1.524 → 24 kHzSupported
支持
Index_TTS/v1.5GitHub
Voice cloning · emotion control
声音克隆 · 情感控制
IndexTTS 222.05 → 22.05 kHzSupported
支持
Index_TTS/v2GitHub
Voice cloning · emotion control
声音克隆 · 情感控制
IndexTTS 2.522.05 → 22.05 kHzSupported
支持
Index_TTS/v2GitHub
Text-to-speech
语音合成
InflectText → 24 kHzNo
InflectGitHub
Text-to-speech
语音合成
KaniTTSText → 22.05 kHzNo
Kani_TTSGitHub
Voice cloning · continuation
声音克隆 · 续写
MOSS-TTS Nano48 → 48 kHzMode-dependent
取决于模式
MOSS_TTSGitHub
Clone · custom voice · voice design
克隆 · 定制音色 · 声音设计
Qwen3-TTS24 → 24 kHzMode-dependent
取决于模式
Qwen_TTSGitHub
English voice cloning
英文声音克隆
Raon-OpenTTS-0.3B16 → 16 kHzRequired
必需
Raon_OpenTTSGitHub
English voice cloning
英文声音克隆
Raon-OpenTTS-1B16 → 16 kHzRequired
必需
Raon_OpenTTSGitHub
Voice cloning
声音克隆
VoxCPM 1.544.1 → 44.1 kHzSupported
支持
VoxCPM/v1.5ModelScope
Clone · continuation · voice design
克隆 · 续写 · 声音设计
VoxCPM 216 → 48 kHzMode-dependent
取决于模式
VoxCPM/v2ModelScope
Voice cloning · dialogue
声音克隆 · 对话
ZipVoice24 → 24 kHzRequired
必需
ZipVoiceGitHub

Performance
性能

OS
系统
Device
设备
Backend
后端
Model
模型
Precision
精度
Time (s)
耗时(秒)
RTF
Ubuntu 24.04Intel Core i7-1165G7CPUF5-TTS · NFE=32f3218060
Ubuntu 24.04NVIDIA GeForce MX150GPUF5-TTS · NFE=32f326221
Ubuntu 24.04Intel Core i7-1165G7CPUIndexTTSf32186
Ubuntu 24.04NVIDIA GeForce MX150GPUBigVGAN V2 24khz_100band_256xf164.61.53
Ubuntu 24.04Intel Core i7-1165G7CPUKaniTTSq8f328.41.4
Ubuntu 24.04Intel Core i7-1165G7CPUKaniTTSq4f325.20.87
Ubuntu 24.04Intel Core i3-12300CPUVoxCPM 1.5q8f3291.5
Ubuntu 24.04NVIDIA GeForce RTX 5060 TiGPUVoxCPM 1.5f161.030.17
Ubuntu 24.04Intel Core i3-12300CPUQwen3-TTS-0.6B-Baseq8f32193.1
Ubuntu 24.04Intel Core i3-12300CPUVoxCPM 2q8f32233.8
Ubuntu 24.04NVIDIA GeForce RTX 5060 TiGPUVoxCPM 2f162.050.34
Ubuntu 24.04Intel Core i7-1165G7CPUFireRedTTS3q8f3231.15.2

Text-to-Speech-TTS-ONNX · ONNX Runtime
github.com/DakeQQ

Contributors

DakeQQ

353 commits

Languages

Python

100.0%