--- 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** ![RTF](https://img.shields.io/badge/RTF-0.47--0.63-brightgreen) ![TTFA](https://img.shields.io/badge/TTFA-0.48%20s-blue) ![TTFT](https://img.shields.io/badge/TTFT-0.17%20s-lightgrey) ![语言](https://img.shields.io/badge/%E8%AF%AD%E8%A8%80-%E4%B8%AD%E6%96%87%20%2F%20%E8%8B%B1%E6%96%87-blueviolet) ![SampleRate](https://img.shields.io/badge/audio-24%20kHz-blue) [![GitHub](https://img.shields.io/badge/GitHub-AXERA--TECH%2FCuteTTS.AXERA-black)](https://github.com/AXERA-TECH/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/AXERA-TECH/CuteTTS.AXERA - 原始模型: https://huggingface.co/OPPOer/CuteTTS-distill ## 目录 - [模型转换](#convert) - [支持平台](#platform) - [上板部署](#deploy) - [快速开始](#quickstart) - [结果](#results) - [推理速度](#speed) - [参考](#refs) ## 模型转换 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 配置):[AXERA-TECH/CuteTTS.AXERA/model_convert](https://github.com/AXERA-TECH/CuteTTS.AXERA/tree/main/model_convert) ## 支持平台 - 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) ## 上板部署 - 以 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 ``` ## 快速开始(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 单声道。 ## 结果 | 用例 | 文本 | 参考音色 | 音频 | 非流式 | 流式 | |---|---|---|---|---|---| | en_default | The voice generated by this model sou… | | 2.9 s | | | | en_long | Hello, this is a test of the CuteTTS … | | 5.6 s | | | | zh_default | 今天天气很好,我们一起去公园散步吧。 | | 2.7 s | | | | en_other_voice | Quick brown fox jumps over the lazy dog. | | 2.7 s | | | | en_xlong | The quick brown fox jumps over the la… | | 10.6 s | | | > 全部样例由 AX650 板端生成;板端 Whisper 转写与输入文本一致(中英文短句逐字一致,长句差异来自 Whisper 分段)。 ## 推理速度 | 模式 | 实现 | 音频 | 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 | — | ## 参考 - 原始模型: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 组件遵循其各自许可证。