Configuration Parsing Warning:Invalid JSON for config file config.json
Hojo-TTS-Light-40M — AX650 / NPU2
Hojo-TTS-Light-40M 中英双语语音合成(24kHz,15 音色)在爱芯 AX650 上的预编译部署包, 全链路 NPU:LM(ax-llm s8)+ fine_local(INT8)+ decoder(SmoothQuant + U16)。
原 NPU3 量化工程:AXERA-TECH/Hojo-TTS-Light
- 转换工具:Pulsar2 7.0-patch1(镜像
pulsar2:7.0-patch1),npu_mode NPU2 - 实测平台:AX650N,
Ax_Version V3.10.2 - 上游模型:
HojoAI/Hojo-TTS-Light-40M
精度与性能
| 指标 | NPU2 | 参考版 NPU3 |
|---|---|---|
| LM greedy 解码逐 token 对比 | 60/60 一致 | |
| fine_local vs fp32 ONNX(cos) | 0.99965 | 0.99967 |
| decoder vs fp32 ONNX(log-mag / phase,cos) | 0.99999 / 0.99995 | 0.99563 / 0.96756 |
| RTF | 0.49–0.60 | 0.44–0.53 |
目录
models/ 预编译模型
lm_s8/ LM 10 层 decode-only axmodel + post + embedding(s8 / bf16 hidden)
fine_local.axmodel INT8
decoder_sq.axmodel SmoothQuant + U16
id2code.bin speaker_vecs.bin speaker_embeds.bin Hojo-TTS-Light-40M-voice.npz
bin/ C++ 可执行(AX650 / aarch64):hojo_tts_cpp、tts_driver
tools/ prepare_prompt_embeds.py:文本 → prompt embedding(host 端运行)
audio/ 板端实机生成的示例音频
用法(板端)
参数说明(尖括号为占位符,实际执行时替换成具体值):
./bin/hojo_tts_cpp \
models/lm_s8 <embeds.bin> <num_tokens> 17659 <max_new_tokens> \
models/fine_local.axmodel models/decoder_sq.axmodel \
models/lm_s8/embed_tokens.bin models/speaker_vecs.bin \
<voice_idx> models/id2code.bin out.wav
<embeds.bin> 为文本 prompt 的 BF16 embedding(由 tools/prepare_prompt_embeds.py 生成),
<num_tokens> 取生成时 *.meta.json 里的 num_tokens;17659 是固定的语音结束 token id,无需修改。
音色索引 0–14(0–12 英文音色,13–14 中文音色,见 models/Hojo-TTS-Light-40M-voice.npz)。
示例音频
中文短句 3.1s(voice 13 / hojo_zh_f_01)
欢迎使用霍霍语音合成模型。
英文短句 4.5s(voice 9 / hojo_en_m_02)
Hello, and welcome to this voice demonstration.
中文长句 10.2s(voice 13 / hojo_zh_f_01)
语音合成技术可以把文字转换成自然流畅的声音,让机器用接近真人的语调朗读各种内容,为日常生活带来很多便利。
英文长句 14.0s(voice 9 / hojo_en_m_02)
Speech synthesis turns written text into natural sounding speech. It lets a computer read any content aloud with a smooth and expressive voice, which makes everyday interaction much more convenient.
参考
模型转换(ONNX → HF safetensors → llm_build2)与 C++ SDK 构建源码见 GitHub:
ml-inory/hojo-tts-light.axera
- Downloads last month
- -