Fun-CosyVoice3-0.5B-2512 on AX8860 (llama.cpp + ggml-axera)

在爱芯 AX8860 的 NPU 上用 llama.cpp 运行 Fun-CosyVoice3-0.5B:零样本语音合成与音色克隆,中英文,流式输出,llama-server 直接提供 /v1/audio/speech。 Fun-CosyVoice3-0.5B on the Axera AX8860 NPU with llama.cpp: zero-shot text-to-speech and voice cloning, Chinese and English, streaming, with /v1/audio/speech served by llama-server itself.

性能 / Performance

实时率 / RTF,短句 / short 0.288(中文 / Chinese),0.283(英文 / English)
实时率 / RTF,长句 / long(17.4 s 音频 / audio) 0.231
流式首包 / streaming first packet 0.43 s(中文),0.45 s(英文)
服务启动 / server start 20.9 s

sh bench.sh 复现 / reproduce(服务端端到端,含 HTTP、分词与 WAV 封装 / server end to end, including HTTP, tokenization and WAV packing;需要板上有 python3 / needs python3 on the board):

请求 / request 音频 / audio 耗时 / time RTF
中文短句 / Chinese short 2.76 s 0.795 s 0.288
英文短句 / English short 3.72 s 1.052 s 0.283
中文长句 / Chinese long 17.44 s 4.037 s 0.231
  • 启动后的第一个请求 0.91 s / the first request after start takes 0.91 s.
  • 新音色的参考音只在第一次使用时编码:3.6 s 参考音 0.41 s,15 s 参考音 1.47 s;之后命中缓存 / a new voice's reference audio is encoded once: 0.41 s for 3.6 s of audio, 1.47 s for 15 s; later requests hit the cache.
  • 内存 / memory:NPU 0.52 GiB,进程峰值 / peak RSS 4.08 GiB。

快速开始 / Quick start

sh run.sh                                         # 默认中文音色 / bundled Chinese voice
sh run.sh "你好,欢迎使用语音合成。"
sh run.sh "The quick brown fox jumps over the lazy dog." examples/asr_en_5s.wav "You are a helpful assistant.<|endofprompt|>Mm-hmm. Oh, yeah, yeah. He wasn't even that big when I started listening." out.wav
sh serve.sh 8080                                  # 服务端 / server
sh bench.sh                                       # 性能复现 / benchmark

run.sh 参数 / arguments:text [reference.wav] [reference text] [output.wav]。 参考文本必须是参考音的完整转写,前面加 You are a helpful assistant.<|endofprompt|>;文本与音频对不上会导致合成内容缺失 / the reference text must be the full transcript of the reference audio, prefixed with You are a helpful assistant.<|endofprompt|>; a transcript that does not match the audio makes the output drop content.

需要 AX8860,SDK V0.6.0(实测版本);HF 下载的文件没有执行权限,用 sh 调用即可 / needs an AX8860 with SDK V0.6.0 (the tested version); call the scripts with sh.

服务端请求示例(参考音与参考文本必填)/ server request (reference audio and text are required):

curl -s http://127.0.0.1:8080/v1/audio/speech -H 'Content-Type: application/json' \
  -d '{"model":"cosyvoice3-0.5b","input":"你好,欢迎使用语音合成。","voice":"default","response_format":"pcm","stream":true,"ref_audio":"<base64 wav>","ref_text":"You are a helpful assistant.<|endofprompt|>..."}' \
  --output out.pcm

response_format 支持 wav 与 pcm(24 kHz、单声道、16 bit);"stream": true 时按块返回原始 PCM / response_format accepts wav and pcm (24 kHz mono 16-bit); with "stream": true the server returns raw PCM chunks.

文件 / Files

文件 / File 说明 / Description
gguf/ 权重(语言模型、flow、声码器、参考音编码),共 2.4 GB / weights (LLM, flow, vocoder, reference encoder), 2.4 GB in total
kernels/ 5 个 4 核 NPU kernel(语言模型 prefill、decode,flow,HiFT 声码器,参考音编码)+ manifest.json / five four-core NPU kernels (LLM prefill and decode, flow, HiFT vocoder, reference encoder)
bin/ llama-server、llama-tts(静态链接 / static)
examples/,cache/ 中英文参考音及其特征缓存 / reference audio and its feature cache
run.sh,serve.sh,bench.sh 命令行合成、服务端、性能复现 / command-line synthesis, server, benchmark

说明 / Notes

  • 权重全部来自 GGUF,加载时送入 NPU;包内不含 ONNX Runtime 或 .onnx 文件 / all weights come from GGUF and are loaded into the NPU at start; the package has no ONNX Runtime and no .onnx files.
  • 上下文固定 4096 token;长文本按标点切段,各段共用同一参考音 / fixed 4096-token context; long text is split at punctuation and every piece reuses the same reference voice.
  • 参考音建议不超过 15 s:超过 30 s 的部分会被截断,接近 30 s 的参考音可能使合成提前结束 / keep reference audio at or below 15 s: anything past 30 s is truncated, and a reference close to 30 s can end the synthesis early.
  • 运行时使用 NPU 4 核;服务端 -np 1 / uses all 4 NPU cores; the server runs -np 1.

正确性 / Correctness

  • 15 句中英文(含音色克隆与 3 句长句)经 ASR 转写无丢句、无重复,平均字/词错误率 0.92% / 15 Chinese and English clips (voice cloning and three long sentences included) transcribe without dropped or repeated text; mean CER/WER 0.92%.
  • 说话人相似度(speaker cosine)均值 0.598,同一流程在 CPU 上为 0.805 / speaker cosine averages 0.598; the same pipeline on the CPU gives 0.805.
  • 连续 20 个请求全部成功,内存无增长;按 PID SIGTERM 2 s 内退出 / 20 back-to-back requests succeed with no memory growth; the process exits within 2 s of SIGTERM.

源码 / Sources

更新 / Changelog

  • 2026-11-17:新增 Fun-CosyVoice3-0.5B-2512:零样本语音合成,流式 /v1/audio/speech / Fun-CosyVoice3-0.5B-2512 added: zero-shot text-to-speech with streaming /v1/audio/speech.
Downloads last month
433
GGUF
Model size
12.1M params
Architecture
cosyvoice3-aux
Hardware compatibility
Log In to add your hardware

16-bit

32-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for AXERA-TECH/Fun-CosyVoice3-0.5B-2512-AX8860-llama.cpp

Quantized
(33)
this model

Collection including AXERA-TECH/Fun-CosyVoice3-0.5B-2512-AX8860-llama.cpp