M5-TTS.AXERA
50M 参数 · 实时流式 · 六语言 + 方言 · zero-shot 音色克隆
| 项目 | 说明 |
|---|---|
| 支持语言 | 中文、英语、德语、法语、日语、韩语(中/英已上板验证) |
| 推理方式 | C++ / Python,6 个 axmodel 全 NPU,流式(0.64 s 一包)+ 非流式 |
| 首包时延 | TTFA 0.37 s、首帧 TTFT 0.07 s(参考音色缓存命中) |
| 实时率 | RTF 0.48–0.58(C++,3–8 s 句)· 0.86–1.04(Python) |
- HuggingFace: https://huggingface.co/HY-2012/M5-TTS.AXERA
- GitHub(源码 + 转换脚本 + C++): https://github.com/ZY-2012/M5-TTS.AXERA
- 原始模型: https://huggingface.co/ASLP-lab/M5-TTS-50M-VoiceClone
- 语音 codec: https://huggingface.co/ASLP-lab/M5-TTS-Audio-Tokenizer
目录
模型转换
For those who are interested in model conversion, you can try to export axmodel through:
- The repo of AXera Platform, where you can get the detailed guide.
- Pulsar2 Link, How to Convert ONNX to axmodel
完整转换脚本(ONNX 导出 / 真实语音校准 / Pulsar2 配置):ZY-2012/M5-TTS.AXERA/model_convert
支持平台
- AX650N / AX8850
上板部署
- 以 root 权限登陆 AX650N 板卡设备
- 已验证设备:AX650N DEMO Board
目录结构
M5-TTS.AXERA/
├── bin/m5tts_ax650 # C++ 推理可执行文件
├── models/
│ ├── *.axmodel # 6 个子图
│ └── assets/ # embedding / heads / RVQ / tokenizer
├── python/
│ ├── m5_ax/ # numpy-only SDK
│ └── demo.py
├── samples/
│ ├── aslp_default_voice.wav
│ └── listen/*.wav # 板端样例(stream/ 为流式输出)
├── config.json
├── run_ax650.sh # 一键脚本(默认 C++,--python 切 SDK)
└── setup.sh
快速开始(AX650 板端)
下载整仓库到板端,在包根目录运行:
bash setup.sh
# C++(默认,最快)
bash run_ax650.sh "你好,欢迎使用我们的语音合成模型。" samples/aslp_default_voice.wav \
"猪携带该疾病,然后通过蚊子传染给人类。" out.wav
# 流式输出
bash run_ax650.sh "你好,欢迎使用我们的语音合成模型。" samples/aslp_default_voice.wav \
"猪携带该疾病,然后通过蚊子传染给人类。" out.wav --stream
# Python SDK(流式 / 非流式)
bash run_ax650.sh "The voice generated by this model sounds amazing!" samples/aslp_default_voice.wav \
"猪携带该疾病,然后通过蚊子传染给人类。" en.wav --python --stream
# 调随机种子 / 最长帧数(1 帧 ≈ 80 ms)
bash run_ax650.sh "Hello from AX650!" samples/aslp_default_voice.wav "参考音频转写" en.wav --seed 42 --max-frames 200
参考音频 ≤ 4.8 s;单次生成 ≤ 20 s 音频;prompt-text 必须是参考音频的准确转写。
C++ 会缓存参考音色(cache/ref),同一音色重复使用时首包时延 0.30 → 0.07 s。
结果
| 用例 | 文本 | 参考音色 | 音频 | 非流式 | 流式 |
|---|---|---|---|---|---|
| zh_default | 你好,欢迎使用我们的语音合成模型。 | 3.04 s | |||
| en_default | The voice generated by this model sounds amazing! | 2.96 s | |||
| zh_long | 今天天气很好,我们一起去公园散步吧。公园里有很多花… | 8.00 s |
全部样例由 AX650 板端生成;流式与非流式输出逐样本一致,板端 SenseVoice 转写与输入文本一致。
推理速度
| 模式 | 实现 | 音频 | TTFT(首帧) | TTFA(首音频) | 总耗时 | RTF(耗时/音频) | 出包间隔 |
|---|---|---|---|---|---|---|---|
| 流式 | C++ | 3.04 s | 0.07–0.30 s | 0.37–0.60 s | 1.52–1.76 s | 0.50–0.58 | 0.64 s(首包 0.40 s) |
| 流式 | Python | 3.12 s | 0.08–0.41 s | 0.69–1.02 s | 2.82–3.23 s | 0.91–1.04 | 0.64 s(首包 0.72 s) |
| 非流式 | C++ | 3.04 s | 0.07–0.30 s | — | 1.52–1.76 s | 0.50–0.58 | — |
| 非流式 | Python | 3.12 s | 0.08–0.41 s | — | 2.82–3.23 s | 0.91–1.04 | — |
区间为“同一参考音色:缓存命中 – 首次”。C++ 长句(8.00 s,缓存):TTFA 0.39 s、总耗时 3.82 s、RTF 0.48。
参考
- 原始模型:https://huggingface.co/ASLP-lab/M5-TTS-50M-VoiceClone
- M5-TTS 代码 / 技术报告:https://github.com/ASLP-lab/M5-TTS
- Qwen3-TTS codec:https://github.com/QwenLM/Qwen3-TTS
- Pulsar2 文档:https://pulsar2-docs.readthedocs.io
License
Apache-2.0。上游 M5-TTS(ASLP-lab)与 Qwen3-TTS codec 遵循其各自许可证,见 NOTICE。
- Downloads last month
- -
Model tree for HY-2012/M5-TTS.AXERA
Base model
ASLP-lab/M5-TTS-50M-VoiceClone