Qwen3 TTS GGUF

提供商Serveurperso
分类text-to-speech
许可证apache-2.0
下载量571.8K
星标0

简介

Qwen3 TTS GGUF 是基于通义千问最新语音生成能力并经过 GGUF 量化的版本。它将原本沉重的语音模型轻量化,使得开发者能够在消费级硬件(如个人 PC 或 Mac)上高效部署高质量的文本转语音服务。该模型在自然度与语调起伏上表现出色,非常适合用于构建本地 AI 助手、有声书阅读器或低延迟的语音交互应用。对于习惯使用 llama.cpp 等推理框架的用户来说,其上手难度极低,是目前在本地实现流畅中文语音合成的理想选择。

核心亮点

  • GGUF 量化支持,低内存占用且部署便捷
  • 中文语音合成自然,语调起伏贴近真人
  • 极低推理延迟,适配本地实时交互场景
  • Apache-2.0 协议,对商业应用非常友好

使用方法

安装依赖
# 安装 Hugging Face transformers
pip install transformers torch
SDK 使用
# 使用 transformers 加载模型
from transformers import AutoModel, AutoTokenizer

model = AutoModel.from_pretrained("Serveurperso/Qwen3-TTS-GGUF")
tokenizer = AutoTokenizer.from_pretrained("Serveurperso/Qwen3-TTS-GGUF")

Hugging Face 下载

我们推荐使用命令行或者 Hugging Face Hub SDK 来进行模型的下载。

操作指引:在下载前,请先通过如下命令安装 huggingface_hub:

操作指引
pip install -U huggingface_hub

命令行下载

下载完整模型库

下载完整模型库
huggingface-cli download Serveurperso/Qwen3-TTS-GGUF

下载单个文件到指定本地文件夹(以下载 config.json 到当前路径下 ./dir 目录为例)

下载单个文件到指定本地文件夹(以下载 config.json 到当前路径下 ./dir 目录为例)
huggingface-cli download Serveurperso/Qwen3-TTS-GGUF config.json --local-dir ./dir

更多命令行下载选项,可参见官方文档

SDK 下载

SDK 下载
# 模型下载
from huggingface_hub import snapshot_download
model_dir = snapshot_download('Serveurperso/Qwen3-TTS-GGUF')

Git 下载

请确保 lfs 已经被正确安装

Git 下载
git lfs install
git clone https://huggingface.co/Serveurperso/Qwen3-TTS-GGUF

如果您希望跳过 lfs 大文件下载,可以使用如下命令

跳过 LFS
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/Serveurperso/Qwen3-TTS-GGUF

模型文件托管在 Hugging Face Hub,使用 HF CLI / SDK / Git 直接下载,不经过本站。

PyTorch / Transformers 使用

安装 Transformers

安装 Transformers
pip install -U transformers torch

模型加载和推理

模型加载和推理
from transformers import AutoModelForCausalLM, AutoTokenizer

model = AutoModelForCausalLM.from_pretrained('Serveurperso/Qwen3-TTS-GGUF')
tokenizer = AutoTokenizer.from_pretrained('Serveurperso/Qwen3-TTS-GGUF')

完整文档

来源: HuggingFace

---
license: apache-2.0
library_name: gguf
pipeline_tag: text-to-speech
tags:
- tts
- text-to-speech
- voice-cloning
- voice-design
- mandarin-dialects
- ggml
- gguf
- qwen
- qwen3
- qwen3-tts
- cpp
language:
- zh
- en
- fr
- de
- es
- it
- pt
- ja
- ko
- ru
- ar
base_model:
- Qwen/Qwen3-TTS-Tokenizer-12Hz
- Qwen/Qwen3-TTS-12Hz-0.6B-Base
- Qwen/Qwen3-TTS-12Hz-0.6B-CustomVoice
- Qwen/Qwen3-TTS-12Hz-1.7B-Base
- Qwen/Qwen3-TTS-12Hz-1.7B-CustomVoice
- Qwen/Qwen3-TTS-12Hz-1.7B-VoiceDesign
---

Qwen3-TTS GGUF

GGUF weights for qwentts.cpp,
a C++17/GGML port of Qwen3-TTS 12 Hz (Qwen team, Alibaba). Multilingual
zero shot TTS with named speakers and Mandarin dialects, 24 kHz mono.
Runs on CPU, CUDA, Metal, Vulkan.

Files

Two GGUFs load together :

qwen-talker-{size}-{mode}-{variant}.gguf Qwen3 LM + code predictor MTP head + optional speaker encoder, text -> 12 Hz codes
qwen-tokenizer-12hz-{variant}.gguf SEANet + ConvNeXt + DAC v2 + RVQ, 12 Hz codes <-> 24 kHz audio

Three modes are available across two talker sizes :

| mode | 0.6B | 1.7B | use case |
|-------------|------|------|---------------------------------------------------|
| base | yes | yes | zero shot TTS with named speakers and dialects |
| customvoice | yes | yes | zero shot voice cloning from a reference clip |
| voicedesign | no | yes | voice synthesis from attribute description |

The tokenizer is shared across every talker.

| variant | talker 0.6B | talker 1.7B | tokenizer | use case |
|---------|-------------|-------------|-----------|--------------------------------|
| F32 | 3.7 GB | 7.7 GB | 647 MB | reference, debug, conversion |
| BF16 | 1.8 GB | 3.9 GB | 359 MB | source faithful, max precision |
| Q8_0 | 993 MB | 2.1 GB | 291 MB | recommended default |
| Q4_K_M | 629 MB | 1.2 GB | 255 MB | lowest VRAM |

Quick start

code
git clone --recurse-submodules https://github.com/ServeurpersoCom/qwentts.cpp.git
cd qwentts.cpp && ./buildcuda.sh
mkdir -p models
huggingface-cli download Serveurperso/Qwen3-TTS-GGUF \
    qwen-talker-1.7b-base-Q8_0.gguf qwen-tokenizer-12hz-Q8_0.gguf \
    --local-dir models
cd examples
./base.sh         # named speaker      -> base.wav
./clone.sh        # voice cloning      -> clone.wav
./customvoice.sh  # custom voice mode  -> customvoice.wav
./tts.sh          # voice design       -> tts.wav

Backends

Set GGML_BACKEND to force a device, otherwise the runtime picks the
best one available.

| value | target |
|-----------|----------------------------------------------|
| CUDA0 | NVIDIA GPU, fastest path on Ada / Blackwell |
| Vulkan0 | Cross vendor GPU (AMD / Intel / NVIDIA) |
| Metal | Apple Silicon GPU |
| CPU | CPU fallback, x86 variant auto selected |

Quantization policy

Tokenizer GGUFs are not uniform quants. Three categories get a
dedicated treatment :

| tensor | dtype across all variants |
|--------------------------------------------------------------|---------------------------|
| RVQ codebooks, input_proj / output_proj, speaker encoder fc | F32 |
| 1D tensors (gamma, biases, norms, snake alpha and beta) | F32 |
| Conv kernels with non alignable rows (K=7,3,1) | F16 in Q* variants |

Conv kernel rows (K=7,3,1) never divide a K-quant block size, so the
quantizer skips the Q* intermediates and lands on F16 directly. This
is the last resort branch of llama.cpp's tensor_type_fallback
applied unconditionally for these kernels. F16 has no block size and
matches the runtime target dtype on every backend. The talker LM
(Qwen3 backbone, hidden divisible by 256) follows standard llama.cpp
K-quant across variants. The code predictor MTP head and the speaker
encoder live in the talker GGUF and share its quantization.

License

Upstream model : Qwen3-TTS by Alibaba / Qwen team, Apache 2.0
Audio codec : Qwen3-TTS-Tokenizer-12Hz (Qwen team), Apache 2.0
GGUF tooling : qwentts.cpp, MIT