README: align with the other AX8860 packages
Browse files- README.md +70 -70
- SHA256SUMS +1 -1
README.md
CHANGED
|
@@ -1,96 +1,96 @@
|
|
| 1 |
---
|
| 2 |
-
base_model:
|
| 3 |
-
|
| 4 |
pipeline_tag: text-to-speech
|
| 5 |
---
|
|
|
|
| 6 |
|
| 7 |
-
|
|
|
|
| 8 |
|
| 9 |
-
|
| 10 |
-
llama.cpp, with zero-shot voice cloning and streamed output from
|
| 11 |
-
`llama-server` (`/v1/audio/speech`).
|
| 12 |
|
| 13 |
-
|
| 14 |
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
| Request | Audio | Time to full WAV | RTF |
|
| 18 |
|---|---:|---:|---:|
|
| 19 |
-
| English, short | 3.36 s | 0.93 s | 0.276 |
|
| 20 |
-
| Chinese, short | 3.20 s | 0.92 s | 0.286 |
|
| 21 |
-
| English, medium | 8.16 s | 2.21 s | 0.270 |
|
| 22 |
-
| Chinese, medium | 8.48 s | 2.34 s | 0.276 |
|
| 23 |
-
| English, long | 22.24 s | 6.00 s | 0.270 |
|
| 24 |
-
| Chinese, long | 32.00 s | 8.58 s | 0.268 |
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
```
|
| 43 |
|
| 44 |
-
Server:
|
| 45 |
|
| 46 |
-
```
|
| 47 |
LD_LIBRARY_PATH=/opt/lib GGML_AXERA_KERNEL_DIR=$PWD/kernels \
|
| 48 |
MALLOC_ARENA_MAX=2 MALLOC_MMAP_THRESHOLD_=131072 MALLOC_TRIM_THRESHOLD_=131072 \
|
| 49 |
./bin/llama-server -m gguf/VoxCPM2-BaseLM-F16.gguf \
|
| 50 |
--voxcpm2-acoustic gguf/VoxCPM2-Acoustic-F16.gguf \
|
| 51 |
-
-ngl 99 -c 8192 -b 1024 -np 1 -t 8 --threads-http 1
|
| 52 |
-
--host 127.0.0.1 --port 8080
|
| 53 |
-
```
|
| 54 |
|
| 55 |
-
|
|
|
|
|
|
|
| 56 |
|
| 57 |
-
|
| 58 |
-
curl -
|
| 59 |
-
-
|
| 60 |
-
-d '{"model":"voxcpm2","input":"Hello from VoxCPM2.","response_format":"wav"}'
|
| 61 |
```
|
| 62 |
|
| 63 |
-
|
|
|
|
| 64 |
|
| 65 |
-
|
| 66 |
-
curl -sN -o out.pcm http://127.0.0.1:8080/v1/audio/speech \
|
| 67 |
-
-H 'Content-Type: application/json' \
|
| 68 |
-
-d '{"model":"voxcpm2","input":"Hello from VoxCPM2.","response_format":"pcm","stream":true}'
|
| 69 |
-
```
|
| 70 |
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
`cfg_value`, `temperature`. Requests are served one at a time.
|
| 74 |
|
| 75 |
-
##
|
| 76 |
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
kernels/ eight four-core AXModels and manifest.json
|
| 82 |
-
examples/reference.wav reference voice used by the benchmark's clone requests
|
| 83 |
-
run.sh one-shot CLI wrapper
|
| 84 |
-
bench.sh benchmark; all numbers above come from it
|
| 85 |
-
BIN_COMMIT llama.cpp commit of the shipped binaries
|
| 86 |
-
SHA256SUMS checksums of the release files
|
| 87 |
-
```
|
| 88 |
|
| 89 |
-
|
| 90 |
-
BaseLM decode, ResidualLM with its post-processing and stop head, the local
|
| 91 |
-
encoder, the diffusion loop (all nine Euler steps in one call), and the
|
| 92 |
-
AudioVAE decoder and encoder. Each 160 ms audio step makes four NPU calls.
|
| 93 |
|
| 94 |
-
##
|
| 95 |
|
| 96 |
-
|
|
|
|
| 1 |
---
|
| 2 |
+
base_model:
|
| 3 |
+
- openbmb/VoxCPM2
|
| 4 |
pipeline_tag: text-to-speech
|
| 5 |
---
|
| 6 |
+
# VoxCPM2 on AX8860 (llama.cpp + ggml-axera, 2026-11-15)
|
| 7 |
|
| 8 |
+
在爱芯 AX8860 的 NPU(4 核)上用 llama.cpp 运行 VoxCPM2 语音合成:零样本音色克隆、流式输出,OpenAI 兼容的 `/v1/audio/speech`。
|
| 9 |
+
VoxCPM2 text-to-speech on the 4-core NPU of the Axera AX8860, with llama.cpp: zero-shot voice cloning, streamed output and an OpenAI-compatible `/v1/audio/speech`.
|
| 10 |
|
| 11 |
+
## 性能 / Performance
|
|
|
|
|
|
|
| 12 |
|
| 13 |
+
AX8860,NPU 4 核,服务模式端到端;数字全部来自 `./bench.sh` / 4 cores, server, end to end; all numbers come from `./bench.sh`:
|
| 14 |
|
| 15 |
+
| 请求 / Request | 语音 / Audio | 耗时 / Time | RTF |
|
|
|
|
|
|
|
| 16 |
|---|---:|---:|---:|
|
| 17 |
+
| 英文短句 / English, short | 3.36 s | 0.93 s | 0.276 |
|
| 18 |
+
| 中文短句 / Chinese, short | 3.20 s | 0.92 s | 0.286 |
|
| 19 |
+
| 英文中句 / English, medium | 8.16 s | 2.21 s | 0.270 |
|
| 20 |
+
| 中文中句 / Chinese, medium | 8.48 s | 2.34 s | 0.276 |
|
| 21 |
+
| 英文长句 / English, long | 22.24 s | 6.00 s | 0.270 |
|
| 22 |
+
| 中文长句 / Chinese, long | 32.00 s | 8.58 s | 0.268 |
|
| 23 |
+
|
| 24 |
+
| 项目 / Item | 结果 / Result |
|
| 25 |
+
|---|---|
|
| 26 |
+
| 流式首包 / streamed first audio | 英文 / English 0.18 s,中文 / Chinese 0.20 s |
|
| 27 |
+
| 服务就绪 / server ready | 62.5 s |
|
| 28 |
+
| NPU 内存 / NPU memory (CMM) | 约 / about 3.0 GB |
|
| 29 |
+
| 主机内存 / host RSS | 约 / about 6.3 GB |
|
| 30 |
+
|
| 31 |
+
连续 60 个混合请求(一半为音色克隆)内存不增长 / memory stays flat over 60 mixed requests, half of them voice clones.
|
| 32 |
+
|
| 33 |
+
## 文件 / Files
|
| 34 |
+
|
| 35 |
+
| 文件 / File | 说明 / Description |
|
| 36 |
+
|---|---|
|
| 37 |
+
| `gguf/VoxCPM2-BaseLM-F16.gguf` | 语言模型权重(GGUF F16,3.2 GB)/ language model weights |
|
| 38 |
+
| `gguf/VoxCPM2-Acoustic-F16.gguf` | 声学部分权重(GGUF F16,1.8 GB)/ acoustic weights |
|
| 39 |
+
| `bin/` | llama.cpp 板端程序 `llama-server`、`llama-tts`(静态链接)/ the board programs (static) |
|
| 40 |
+
| `kernels/` | NPU kernel 8 个 + `manifest.json` / eight kernels + `manifest.json` |
|
| 41 |
+
| `run.sh` | 运行脚本 / run script |
|
| 42 |
+
| `bench.sh` | 性能脚本,上表数字由它生成 / benchmark script that produces the tables above |
|
| 43 |
+
| `examples/reference.wav` | 音色克隆用的参考录音 / reference recording for voice cloning |
|
| 44 |
+
| `SHA256SUMS` | 全包校验和 / checksums |
|
| 45 |
+
|
| 46 |
+
8 个 kernel:语言模型 prefill(256 与 16 token 两种页长)、语言模型 decode、残差语言模型(含后处理与停止头)、局部编码器、扩散循环(9 步 Euler 一次调用完成)、声码器解码与编码。
|
| 47 |
+
Eight kernels: language-model prefill (256- and 16-token pages), language-model decode, the residual language model (with post-processing and the stop head), the local encoder, the diffusion loop (all nine Euler steps in one call), and the audio VAE decoder and encoder.
|
| 48 |
+
|
| 49 |
+
## 运行 / Run
|
| 50 |
+
|
| 51 |
+
环境 / Requirements:AX8860 与 SDK 运行库(`/opt/lib`),板上需有 `curl` / an AX8860 with the SDK runtime in `/opt/lib`, and `curl` on the board.
|
| 52 |
+
|
| 53 |
+
```sh
|
| 54 |
+
./run.sh "今天天气很好,我们一起去公园散步吧。" out.wav # 默认音色 / default voice
|
| 55 |
+
./run.sh "这是零样本克隆。" clone.wav examples/reference.wav # 音色克隆 / voice cloning
|
| 56 |
+
./run.sh "这是零样本克隆。" clone.wav examples/reference.wav "参考录音的文字" # 加上参考文字 / with the reference transcript
|
| 57 |
```
|
| 58 |
|
| 59 |
+
服务 / Server:
|
| 60 |
|
| 61 |
+
```sh
|
| 62 |
LD_LIBRARY_PATH=/opt/lib GGML_AXERA_KERNEL_DIR=$PWD/kernels \
|
| 63 |
MALLOC_ARENA_MAX=2 MALLOC_MMAP_THRESHOLD_=131072 MALLOC_TRIM_THRESHOLD_=131072 \
|
| 64 |
./bin/llama-server -m gguf/VoxCPM2-BaseLM-F16.gguf \
|
| 65 |
--voxcpm2-acoustic gguf/VoxCPM2-Acoustic-F16.gguf \
|
| 66 |
+
-ngl 99 -c 8192 -b 1024 -np 1 -t 8 --threads-http 1 --host 0.0.0.0 --port 8080
|
|
|
|
|
|
|
| 67 |
|
| 68 |
+
# 整段 WAV / complete WAV
|
| 69 |
+
curl -s -o out.wav http://127.0.0.1:8080/v1/audio/speech -H 'Content-Type: application/json' \
|
| 70 |
+
-d '{"model":"voxcpm2","input":"今天天气很好。","response_format":"wav"}'
|
| 71 |
|
| 72 |
+
# 流式 PCM / streamed raw PCM
|
| 73 |
+
curl -sN -o out.pcm http://127.0.0.1:8080/v1/audio/speech -H 'Content-Type: application/json' \
|
| 74 |
+
-d '{"model":"voxcpm2","input":"今天天气很好。","response_format":"pcm","stream":true}'
|
|
|
|
| 75 |
```
|
| 76 |
|
| 77 |
+
音色克隆在请求里加 `ref_audio`(base64 WAV),可选 `ref_text`;其他可用字段:`seed`、`max_steps`、`inference_timesteps`、`cfg_value`、`temperature`。
|
| 78 |
+
Voice cloning adds `ref_audio` (base64 WAV) and optionally `ref_text`; other fields: `seed`, `max_steps`, `inference_timesteps`, `cfg_value`, `temperature`.
|
| 79 |
|
| 80 |
+
## 正确性 / Correctness
|
|
|
|
|
|
|
|
|
|
|
|
|
| 81 |
|
| 82 |
+
- 11 段中英文文本各 5 个随机种子,共 55 段合成语音用 Qwen3-ASR 转写:没有丢句或重复句,与官方 CPU 实现的结果一致 / 55 synthesized clips (11 Chinese/English passages, five seeds each) transcribed with Qwen3-ASR: no missing or repeated clause, matching the official CPU implementation.
|
| 83 |
+
- 14–24 s 的中英文长句转写与原文一致 / 14–24 s Chinese and English passages transcribe back to the input text.
|
|
|
|
| 84 |
|
| 85 |
+
## 已知限制 / Known limits
|
| 86 |
|
| 87 |
+
- 运行时独占 NPU 4 核 / takes all 4 NPU cores; do not run other NPU programs alongside.
|
| 88 |
+
- 请求串行处理,服务端 `-np 1` / requests are served one at a time; the server runs `-np 1`.
|
| 89 |
+
|
| 90 |
+
## 源码 / Sources
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 91 |
|
| 92 |
+
- llama.cpp:[ZHEQIUSHUI/llama.cpp](https://github.com/ZHEQIUSHUI/llama.cpp) @ `14fcd6e3b`
|
|
|
|
|
|
|
|
|
|
| 93 |
|
| 94 |
+
## 更新 / Changelog
|
| 95 |
|
| 96 |
+
- 2026-11-15:首次发布 / first release.
|
SHA256SUMS
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
d99f5c1aa33b31d35128043252ff4c2ec85edfc407bb1c241f58381f871a2ed3 ./BIN_COMMIT
|
| 2 |
-
|
| 3 |
5ac92465c6adccfefb32f723f70e0f942036bc23743280c744703ec20ba6ffe6 ./bench.sh
|
| 4 |
55219456ac626058b5584be6f514bc53f7d6f3dce4e5ba97bb417d9cc57a55b1 ./bin/llama-server
|
| 5 |
b50e8c9860bd2439c72f93c1007dfb5fa57f5e55db9ac806fb095645dcbce274 ./bin/llama-tts
|
|
|
|
| 1 |
d99f5c1aa33b31d35128043252ff4c2ec85edfc407bb1c241f58381f871a2ed3 ./BIN_COMMIT
|
| 2 |
+
d0cef6617094dcd9a5c14995e057857d8dc952fe23e37012a90b3d2a7d3f710f ./README.md
|
| 3 |
5ac92465c6adccfefb32f723f70e0f942036bc23743280c744703ec20ba6ffe6 ./bench.sh
|
| 4 |
55219456ac626058b5584be6f514bc53f7d6f3dce4e5ba97bb417d9cc57a55b1 ./bin/llama-server
|
| 5 |
b50e8c9860bd2439c72f93c1007dfb5fa57f5e55db9ac806fb095645dcbce274 ./bin/llama-tts
|