---
title: M5-TTS-GGUF
canonical_url: "https://www.modelscope.cn/models/yoleen/M5-TTS-GGUF"
md_url: "https://www.modelscope.cn/models/yoleen/M5-TTS-GGUF.md"
repository: yoleen/M5-TTS-GGUF
last_updated: 2026-11-14
license: apache-2.0
pipeline_tag: text-to-speech
tasks:
  - text-to-speech
base_model:
  - ASLP-lab/M5-TTS
base_model_relation: quantized
library_name:
  - gguf
language:
  - zh
  - en
  - de
  - fr
  - ja
  - ko
downloads: 13
stars: 0
tags:
  - tts
  - text-to-speech
  - voice-cloning
  - gguf
  - rapidspeech
  - m5-tts
  - ggml
  - cpu-inference
---

# M5-TTS-GGUF

> M5-TTS-GGUF - yoleen 在 ModelScope 开源的模型。M5-TTS — GGUF for RapidSpeech.cpp

yoleen/M5-TTS-GGUF 是 ModelScope 魔搭社区上的text-to-speech模型，采用 apache-2.0 许可，基于 ASLP-lab/M5-TTS 构建。

- **Repository**: yoleen/M5-TTS-GGUF
- **License**: apache-2.0
- **Tasks**: text-to-speech
- **Base model**: ASLP-lab/M5-TTS
- **Tags**: tts, text-to-speech, voice-cloning, gguf, rapidspeech, m5-tts, ggml, cpu-inference
- **Downloads**: 13
- **Stars**: 0
- **Last updated**: 2026-11-14

Source: https://www.modelscope.cn/models/yoleen/M5-TTS-GGUF

---

# M5-TTS — GGUF for RapidSpeech.cpp

[ASLP-lab/M5-TTS](https://github.com/ASLP-lab/M5-TTS) (50M-param multilingual TTS) converted to GGUF for native CPU inference with [RapidAI/RapidSpeech.cpp](https://github.com/RapidAI/RapidSpeech.cpp).

## Model Description

M5-TTS is a compact language-model-based speech generation system with multi-token prediction (16 codebooks @ 12.5 fps) and the Qwen3-TTS 12Hz codec decoder. It supports zero-shot voice cloning from a short reference audio + transcript.

- **LM**: 30M temporal backbone (llama-30M flavor) + 20M local MTP depth decoder (llama-20M flavor)
- **Codec**: Qwen3-TTS 12Hz tokenizer — encoder (SEANet + Mimi transformer + RVQ argmin) + decoder (RVQ → causal conv → 8L sliding-window transformer → conv upsampler)
- **Output**: 24 kHz mono
- **Languages**: Chinese, English, German, French, Japanese, Korean (+ Cantonese, Sichuanese dialects)

This GGUF bundles the full pipeline in a single file: LM weights, codec encoder, codec decoder, llama3 byte-level BPE tokenizer, and precomputed RoPE tables.

## GGUF Variants

| Variant | Size | Precision | Recommended |
|---|---|---|---|
| `m5tts-f16.gguf` | 1.03 GB | FP16 weights | ✅ Best quality |
| `m5tts-q8_0.gguf` | 698 MB | Q8_0 quantized | Balanced |
| `m5tts-q4_k_m.gguf` | 609 MB | Q4_K_M quantized | Smallest |

## Usage

### 1. Build RapidSpeech.cpp

```bash
git clone https://github.com/RapidAI/RapidSpeech.cpp.git
cd RapidSpeech.cpp
cmake -B build && cmake --build build --parallel $(nproc)
```

> Requires the `feat/m5-tts` branch (or the merged PR).

### 2. Run TTS with voice cloning

```bash
./build/rs-tts-offline \
  -m m5tts-f16.gguf \
  --ref reference.wav \
  --ref-text "参考音频的精确转写" \
  -t "你好，欢迎使用我们的语音合成模型。" \
  --lang Chinese \
  --gpu false --threads 8 \
  -o output.wav
```

The `--ref` audio should be a 24 kHz mono WAV (other sample rates are resampled automatically). The `--ref-text` must be the **exact** transcript of the reference audio.

### 3. Verify output with x-asr

```bash
./build/rs-asr-offline -m xasr-q8_0.gguf -w output.wav
# Expected: 你好，欢迎使用我们的语音合成模型。
```

## Conversion

To reproduce the GGUF from the original M5-TTS checkpoint:

```bash
pip install modelscope safetensors gguf torch
modelscope download --model ASLP-lab/M5-TTS --local_dir ~/models/M5-TTS
modelscope download --model ASLP-lab/M5-TTS-Audio-Tokenizer --local_dir ~/models/M5-TTS-Audio-Tokenizer

python scripts/convert_m5tts_to_gguf.py \
  --m5-dir ~/models/M5-TTS \
  --codec-dir ~/models/M5-TTS-Audio-Tokenizer \
  --output m5tts-f16.gguf --out-type f16

# Quantize
./build/rs-quantize m5tts-f16.gguf m5tts-q8_0.gguf q8_0
./build/rs-quantize m5tts-f16.gguf m5tts-q4_k_m.gguf q4_k_m
```

## Benchmark

CPU 8-thread, WSL2, RTX 4060 Ti:

| Variant | RTF ↓ | Notes |
|---|---|---|
| f16 | 1.46 | Best quality, voice cloning works |
| q8_0 | 1.02 | Near-f16 quality |
| q4_k_m | 1.44 | Degraded, usable for testing |

ASR round-trip (x-asr q8_0): target text "你好，欢迎使用我们的语音合成模型。" transcribed with exact match.

## Architecture

```
text (+ref audio) → wetext TN → llama3 BPE
  → backbone (8L llama-30M) prefill [text ‖ codec-encoded prompt]
  → frame loop: backbone step → MTP depth decoder (5L llama-20M) × 16 codebooks
  → Qwen3-TTS 12Hz codec decoder → 24 kHz PCM
```

## Source Model

- [ASLP-lab/M5-TTS](https://github.com/ASLP-lab/M5-TTS) — GitHub
- [ASLP-lab/M5-TTS](https://www.modelscope.cn/models/ASLP-lab/M5-TTS) — ModelScope (checkpoint)
- [ASLP-lab/M5-TTS-Audio-Tokenizer](https://www.modelscope.cn/models/ASLP-lab/M5-TTS-Audio-Tokenizer) — ModelScope (codec)
- Technical report: [M5-TTS v3](https://aslp-lab.github.io/M5-TTS-Demo-Page/m5-tts-v3.pdf)

## License

Refer to the license terms of [ASLP-lab/M5-TTS](https://github.com/ASLP-lab/M5-TTS) and the Qwen3-TTS codec implementation (Apache-2.0).
