Qwen3-TTS-1.7B on AX8860 (llama.cpp + ggml-axera, 2026-11-02)

在爱芯 AX8860 的 NPU(4 核)上用 llama.cpp 运行 Qwen3-TTS-1.7B 语音合成(声音克隆)。 Qwen3-TTS-1.7B speech synthesis (voice cloning) on the 4-core NPU of the Axera AX8860, with llama.cpp.

文件 / Files

文件 / File 说明 / Description
qwen3-tts-1.7b-bf16.gguf talker 权重(GGUF BF16,3.2 GB,md5 15e8a180e0b87f7e680e7acb29e20cc9)/ talker weights
mmproj-qwen3-tts-1.7b-bf16.gguf code predictor、声码器、说话人编码器、语音编码器(参考文本克隆用)权重(GGUF BF16,849 MB,md5 39cdfd61467947ab9f102a8605f006ab)/ code predictor, codec decoder, speaker encoder and speech tokenizer encoder (for cloning with the reference text) weights
bin/ llama.cpp 板端程序 llama-tts(静态链接,只依赖系统 /opt/lib 与 libc)/ the board program (static; needs only the system /opt/lib and libc)
kernels/ NPU kernel 4 个:talker prefill、talker decode(含 codec 输出头)、code predictor(一次一帧,运行时 top-k)、声码器(一次 72 帧)+ manifest.json / four kernels: talker prefill, talker decode (with the codec head), code predictor (one frame per call, runtime top-k), codec decoder (72 frames per call) + manifest.json
run.sh 运行脚本 / run script

权重只来自 GGUF:kernel 不含权重,加载时从 GGUF 转换(talker 与 code predictor MXFP8,声码器 BF16)。 The weights come only from the GGUFs: the kernels hold none; they are converted at load (talker and code predictor MXFP8, codec decoder BF16).

运行 / Run

环境 / Requirements:AX8860,SDK V0.5.0 或更新(cat /proc/ax_proc/version)/ SDK V0.5.0 or newer.

需要自备一段几秒钟的参考录音(要克隆的声音,wav 或 mp3);本仓库不附带音频。 Bring a reference recording of a few seconds (the voice to clone, wav or mp3); none is included.

./run.sh "今天天气很好,我们一起去公园散步吧。" speaker.wav out.wav zh
./run.sh "The quick brown fox jumps over the lazy dog." speaker.wav out.wav en
# 加上参考录音的文字内容(推荐,音色更像)/ with the transcript of the recording (recommended, closer voice)
./run.sh "今天天气很好,我们一起去公园散步吧。" speaker.wav out.wav zh "参考录音里说的话"

两种克隆方式 / two cloning modes:

  • 只给录音:用说话人向量(x-vector)克隆音色 / recording only: the speaker vector (x-vector) carries the voice.
  • 录音 + 文字(第 5 个参数,对应 --tts-ref-text):官方 ICL 方式,录音编码成语音 token 放进 prompt,音色、语气更接近; 文字须与录音内容一致 / recording + its transcript (5th argument, --tts-ref-text): the official ICL mode, the recording becomes speech tokens in the prompt, for a closer voice and manner; the text must match what the recording says.

参数 / Arguments:文本、参考录音、输出文件(默认 out.wav)、语言(zh en de it pt es ja ko fr ru,默认 zh)、参考录音的文字(可选)。 采样 temperature 0.9、top-k 50(官方默认);-n 2000 帧(约 160 s)为上限。 text, reference recording, output file (default out.wav), language (default zh), the recording's transcript (optional); sampling temperature 0.9, top-k 50 (the official defaults); at most 2000 frames (~160 s).

直接调用程序时设置 / When calling the program directly: LD_LIBRARY_PATH=/opt/lib GGML_AXERA_KERNEL_DIR=<repo>/kernels, -ngl 99 -c 4096,top-k 不超过 50 / top-k up to 50。

性能 / Performance

AX8860,SDK V0.5.1,NPU 4 核;一段中文生成 27.2 s 语音 / 4 cores; one Chinese paragraph, 27.2 s of speech:

项目 / Item 结果 / Result
合成耗时 / synthesis time 14.41 s(RTF 0.53)
不计首次声码器权重转换 / without the first codec weight conversion RTF 0.40,每帧(80 ms 音频)32 ms / 32 ms per 80 ms frame
NPU:code predictor / talker decode 每帧 / per frame 7.8 ms / 8.1 ms

每个进程一次性的开销 / once per process:加载与权重转换约 14 s(0.6B)/ 25 s(1.7B);参考录音在 CPU 上编码,耗时随长度 增长(22 s 的参考约 10 s);第一次合成另加约 3 s 声码器权重转换(已计入上表的合成耗时)。 load and weight conversion 14 s (0.6B) / 25 s (1.7B); the reference recording is encoded on the CPU, in time growing with its length (10 s for a 22 s one); the first synthesis adds ~3 s of codec weight conversion (in the synthesis time above).

正确性 / Correctness

中、英文测试句(贪心与采样,两种克隆方式)生成的语音经 Qwen3-ASR 转写与原文逐字一致。 Speech of the Chinese and English test sentences (greedy and sampled, both cloning modes), transcribed back with Qwen3-ASR, matches the text exactly.

已知限制 / Known limits

  • 运行时独占 NPU 4 核 / takes all 4 NPU cores; do not run other NPU programs alongside.
  • 上下文 4096;top-k 最大 50 / context 4096; top-k at most 50.
  • 贪心解码(--temp 0)的语音偏长、停顿多,建议用默认采样 / greedy decoding gives long, pause-heavy speech; keep the default sampling.

源码 / Sources

  • llama.cpp:ZHEQIUSHUI/llama.cpp feat/qwen3-whole @ b536fe5(ggml/src/ggml-axera/models/qwen3、qwen3_tts;语音编码器 tools/mtmd/models/qwen3tts-encode.cpp)
  • kernel:ZHEQIUSHUI/ax-dsl-kernels main @ 60dd25b(models/qwen3_tts)
Downloads last month
35
GGUF
Model size
2B params
Architecture
qwen3tts
Hardware compatibility
Log In to add your hardware

16-bit

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

Model tree for AXERA-TECH/Qwen3-TTS-1.7B-AX8860-llama.cpp

Quantized
(29)
this model

Collection including AXERA-TECH/Qwen3-TTS-1.7B-AX8860-llama.cpp