fireredtts3-onnx
FireRedTTS3(零样本语音克隆 / 多语言 TTS)的 ONNX Runtime 部署,纯 CPU、无 torch 依赖。
一键运行(uvx)
uvx fireredtts3-onnx
首次运行自动从 Hugging Face 下载 tokenizer(~11MB)与 ONNX 产物(~16GB), 然后启动 HTTP TTS 服务:
POST /tts
{
"text": "今天天气很好,我们一起去公园散步吧。",
"prompt_text": "参考音频对应的文本",
"prompt_audio_b64": "<参考音频 wav 的 base64>",
"prompt_audio_sr": 16000,
"language": "Chinese" # 可选,默认 Chinese
}
-> {"audio_b64": "<合成 wav base64>", "sample_rate": 24000}
GET /health
单次合成(不启动服务):
uvx fireredtts3-onnx --text "你好世界" --prompt-wav ref.wav --prompt-text "参考文本" --out gen.wav
模型目录
默认缓存到 ~/.cache/fireredtts3-onnx:
weights/文本 tokenizer(来自FireRedTeam/FireRedTTS3,运行时为纯 numpy,无需原始权重)onnx/转换产物(19 个分段 ONNX:campp / redae 编解码 / patch_encoder / dit / 线性头 / embed / norm / prefill_seg1-4 / step_seg1-4,backbone 8.5GB 拆 8 段内联单文件)
产物仓库默认 yunfengwang/fireredtts3-onnx,可用环境变量覆盖:
export FIREREDTTS3_ONNX_REPO="your-hf-account/fireredtts3-onnx"
export HF_ENDPOINT=https://hf-mirror.com # 国内镜像
说明
- 语言标签支持 README 所列 24 种语言与 21 种中文方言(如
ZH_Sichuan) - 未提供参考音频时使用静音 prompt(语音克隆效果依赖参考音频质量)
- 文本规范化(TN)请自行在调用前完成
精度验证
- 全部 19 个分段与 torch fp32 逐算子对齐(encoder latents 偏差 ~1e-4,prefill/step/dit/decoder 1e-5 量级)
- 端到端与 torch 同种子(seed=1234)轨迹完全一致:同一停止步(第 30 步),生成 4.80s 音频
性能实测
4 线程 Intel Xeon Platinum(AVX-512,无 VNNI/fp16 硬件),纯生成耗时(不含模型加载):
| 版本 | RTF(越小越好) |
|---|---|
| torch fp32 原版 | 86.6 |
| ONNX fp32(本包) | 117 |
| MNN fp16+w8(fireredtts3-mnn) | 112 |
结论:在没有 VNNI / fp16 硬件加速的 CPU 上,转换版比 torch/MKL 慢约 30%; MNN 的 int8(w8)/fp16 在此类 CPU 上只省体积不提速,真正加速需要 VNNI(x86) 或 i8mm(ARM) 硬件。
Metadata
Release files for fireredtts3-onnx 0.2.1
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 | |
|---|---|---|---|---|
| fireredtts3_onnx-0.2.1.tar.gz | 11.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| fireredtts3_onnx-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 27.1 kB
Release files / fireredtts3_onnx-0.2.1.tar.gz
| Download URL | fireredtts3_onnx-0.2.1.tar.gz |
|---|---|
| Size | 11.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dde8542285d09ac27601628d75c859f0019f276e09b55ef34df5ab12715ae4b4
|
|
BLAKE2b-256 checksum How to use checksums |
0cb94cad0c3f3bad34c7065b7c118909574cb902c820d16cfe0737495048fd2c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Release files / fireredtts3_onnx-0.2.1-py3-none-any.whl
| Download URL | fireredtts3_onnx-0.2.1-py3-none-any.whl |
|---|---|
| Size | 15.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9b0d13ed3a76e0d4d86c08fa0af8ae093cdb2b1748cd29183bb430bc26e3fccc
|
|
BLAKE2b-256 checksum How to use checksums |
6119d6c5cc41b428a853d0b996694a430ad35e929ac09ccaa89aaed4418feff1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Security for fireredtts3-onnx 0.2.1
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.