|
Download README.md from AXERA-TECH/CuteTTS.AXERA: direct link, hf CLI and curl.
- Browser
- Download file 8.06 kB
-
https://huggingface.co/AXERA-TECH/CuteTTS.AXERA/resolve/main/README.md
- Command line
-
hf download hf://AXERA-TECH/CuteTTS.AXERA/README.md
-
curl -L -o README.md https://huggingface.co/AXERA-TECH/CuteTTS.AXERA/resolve/main/README.md
8.06 kB
| library_name: axera | |
| pipeline_tag: text-to-speech | |
| base_model: OPPOer/CuteTTS-distill | |
| language: | |
| - en | |
| - zh | |
| tags: | |
| - axera | |
| - ax650 | |
| - npu | |
| - text-to-speech | |
| - voice-cloning | |
| - zero-shot | |
| - cutetts | |
| - python | |
| - cpp | |
| # CuteTTS.AXERA | |
| **0.2B · 实时流式 · 支持中英 · zero-shot 音色克隆 · 24 kHz** | |
|      [](https://github.com/ZY-2012/CuteTTS.AXERA) | |
| | 项目 | 说明 | | |
| |---|---| | |
| | **支持语言** | **中文、英文**(已上板验证)· 法语 / 德语 / 西班牙语(未验证) | | |
| | **推理方式** | C++ / Python,9 个 axmodel 全 NPU,流式(1.28 s 一包)+ 非流式 | | |
| | **首包时延** | TTFA **0.48 s**、首 latent TTFT 0.17 s(参考音色缓存命中) | | |
| | **实时率** | RTF **0.47–0.63**(C++,3–10 s 句)· 0.40–0.59(Python) | | |
| - HuggingFace: https://huggingface.co/HY-2012/CuteTTS.AXERA | |
| - GitHub(源码 + 转换脚本 + C++): https://github.com/ZY-2012/CuteTTS.AXERA | |
| - 原始模型: https://huggingface.co/OPPOer/CuteTTS-distill | |
| ## 目录 | |
| - [模型转换](#convert) | |
| - [支持平台](#platform) | |
| - [上板部署](#deploy) | |
| - [快速开始](#quickstart) | |
| - [结果](#results) | |
| - [推理速度](#speed) | |
| - [参考](#refs) | |
| <a id="convert"></a> | |
| ## 模型转换 | |
| For those who are interested in model conversion, you can try to export axmodel through: | |
| - [The repo of AXera Platform](https://github.com/AXERA-TECH), where you can get the detailed guide. | |
| - [Pulsar2 Link, How to Convert ONNX to axmodel](https://pulsar2-docs.readthedocs.io/en/latest/pulsar2/introduction.html) | |
| 完整转换脚本(ONNX 导出 / 真实语音校准 / Pulsar2 配置):[ZY-2012/CuteTTS.AXERA/model_convert](https://github.com/ZY-2012/CuteTTS.AXERA/tree/main/model_convert) | |
| <a id="platform"></a> | |
| ## 支持平台 | |
| - AX650N / AX8850 | |
| - [M4N-Dock(爱芯派 Pro)](https://wiki.sipeed.com/hardware/zh/maixIV/m4ndock/m4ndock.html) | |
| - [AI Pyramid](https://docs.m5stack.com/zh_CN/ai_hardware/AI_Pyramid-Pro) | |
| - [M.2 Accelerator Card](https://docs.m5stack.com/zh_CN/ai_hardware/LLM-8850_Card) | |
| <a id="deploy"></a> | |
| ## 上板部署 | |
| - 以 root 权限登陆 AX650N 板卡设备 | |
| - 已验证设备:AX650N DEMO Board | |
| ### 目录结构 | |
| ```text | |
| CuteTTS.AXERA/ | |
| ├── bin/cutetts_ax650 # C++ 推理可执行文件 | |
| ├── models/ | |
| │ ├── *.axmodel # 9 个子图(解码器按需加载) | |
| │ └── assets/ # embedding 表、mel 滤波器、BN/linear、tokenizer | |
| ├── python/ | |
| │ ├── cutetts_ax/ # numpy-only SDK | |
| │ └── demo.py | |
| ├── samples/ | |
| │ ├── reference*.wav # 参考音色 | |
| │ └── listen/*.wav # 板端生成样例(stream/ 为流式输出) | |
| ├── config.json | |
| ├── run_ax650.sh # 一键脚本(默认 C++) | |
| └── setup.sh | |
| ``` | |
| <a id="quickstart"></a> | |
| ## 快速开始(AX650 板端) | |
| 下载整仓库到板端,在包根目录运行: | |
| ```bash | |
| bash setup.sh | |
| # C++(默认,最快) | |
| bash run_ax650.sh "The voice generated by this model sounds amazing!" samples/reference.wav out.wav | |
| # 流式输出 | |
| bash run_ax650.sh "The voice generated by this model sounds amazing!" samples/reference.wav out.wav --stream | |
| # Python SDK(流式 / 非流式) | |
| bash run_ax650.sh "今天天气很好,我们一起去公园散步吧。" samples/reference.wav zh.wav --python --stream | |
| # 调 CFG / 随机种子 / 最长 patch 数(1 patch ≈ 160 ms) | |
| bash run_ax650.sh "Hello from AX650!" samples/reference.wav en.wav --cfg 2.0 --seed 42 --max-new 128 | |
| # 长文本:自动按句切分(每段 ≤18 s),逐段生成后拼接 | |
| bash run_ax650.sh "长文本内容……" samples/reference.wav long.wav --split | |
| ``` | |
| 参考音频 ≤ 5 s;单次生成 ≤ 20.5 s(**超过加 `--split` 自动按句切分**,可支持任意长度);输出 24 kHz 单声道。 | |
| <a id="results"></a> | |
| ## 结果 | |
| | 用例 | 文本 | 参考音色 | 音频 | 非流式 | 流式 | | |
| |---|---|---|---|---|---| | |
| | en_default | The voice generated by this model sou… | <audio controls style="width:210px" src="https://huggingface.co/HY-2012/CuteTTS.AXERA/resolve/main/samples/reference.wav"></audio> | 2.9 s | <audio controls style="width:210px" src="https://huggingface.co/HY-2012/CuteTTS.AXERA/resolve/main/samples/listen/en_default.wav"></audio> | <audio controls style="width:210px" src="https://huggingface.co/HY-2012/CuteTTS.AXERA/resolve/main/samples/listen/stream/en_default.wav"></audio> | | |
| | en_long | Hello, this is a test of the CuteTTS … | <audio controls style="width:210px" src="https://huggingface.co/HY-2012/CuteTTS.AXERA/resolve/main/samples/reference.wav"></audio> | 5.6 s | <audio controls style="width:210px" src="https://huggingface.co/HY-2012/CuteTTS.AXERA/resolve/main/samples/listen/en_long.wav"></audio> | <audio controls style="width:210px" src="https://huggingface.co/HY-2012/CuteTTS.AXERA/resolve/main/samples/listen/stream/en_long.wav"></audio> | | |
| | zh_default | 今天天气很好,我们一起去公园散步吧。 | <audio controls style="width:210px" src="https://huggingface.co/HY-2012/CuteTTS.AXERA/resolve/main/samples/reference_zh.wav"></audio> | 2.7 s | <audio controls style="width:210px" src="https://huggingface.co/HY-2012/CuteTTS.AXERA/resolve/main/samples/listen/zh_default.wav"></audio> | <audio controls style="width:210px" src="https://huggingface.co/HY-2012/CuteTTS.AXERA/resolve/main/samples/listen/stream/zh_default.wav"></audio> | | |
| | en_other_voice | Quick brown fox jumps over the lazy dog. | <audio controls style="width:210px" src="https://huggingface.co/HY-2012/CuteTTS.AXERA/resolve/main/samples/reference_en.wav"></audio> | 2.7 s | <audio controls style="width:210px" src="https://huggingface.co/HY-2012/CuteTTS.AXERA/resolve/main/samples/listen/en_other_voice.wav"></audio> | <audio controls style="width:210px" src="https://huggingface.co/HY-2012/CuteTTS.AXERA/resolve/main/samples/listen/stream/en_other_voice.wav"></audio> | | |
| | en_xlong | The quick brown fox jumps over the la… | <audio controls style="width:210px" src="https://huggingface.co/HY-2012/CuteTTS.AXERA/resolve/main/samples/reference.wav"></audio> | 10.6 s | <audio controls style="width:210px" src="https://huggingface.co/HY-2012/CuteTTS.AXERA/resolve/main/samples/listen/en_xlong.wav"></audio> | <audio controls style="width:210px" src="https://huggingface.co/HY-2012/CuteTTS.AXERA/resolve/main/samples/listen/stream/en_xlong.wav"></audio> | | |
| > 全部样例由 AX650 板端生成;板端 Whisper 转写与输入文本一致(中英文短句逐字一致,长句差异来自 Whisper 分段)。 | |
| <a id="speed"></a> | |
| ## 推理速度 | |
| | 模式 | 实现 | 音频 | TTFT(首 latent) | TTFA(首音频) | 总耗时 | RTF(耗时/音频) | 出包间隔 | | |
| |---|---|---|---|---|---|---|---| | |
| | 流式 | C++ | 3.04 s | 0.15–0.21 s(首次 0.57 s) | 0.47–0.52 s(首次 0.89 s) | 1.84–1.89 s | 0.61–0.62 | 1.28 s | | |
| | 流式 | Python | 2.88 s | 0.14–0.15 s(首次 0.86 s) | 0.47–0.49 s(首次 1.20 s) | 1.69–1.71 s | 0.59 | 1.28 s | | |
| | 非流式 | C++ | 3.04 s | 1.06–1.15 s | 1.06–1.15 s | 1.06–1.15 s | 0.35–0.38 | — | | |
| | 非流式 | Python | 2.88 s | 1.16–1.17 s | 1.16–1.17 s | 1.16–1.17 s | 0.40–0.41 | — | | |
| <a id="refs"></a> | |
| ## 参考 | |
| - 原始模型:https://huggingface.co/OPPOer/CuteTTS-distill | |
| - CuteTTS 官方代码 / 论文:https://github.com/OPPO-Mente-Lab/CuteTTS | |
| - Pulsar2 文档:https://pulsar2-docs.readthedocs.io | |
| - AXERA 开源仓库:https://github.com/AXERA-TECH | |
| ## License | |
| Apache-2.0。上游 CuteTTS(OPPO/Fudan)及 Qwen3、DAC 组件遵循其各自许可证。 | |