Skip to content

M5-TTS integration — native GGUF TTS architecture (completed, PR #5) #6

Open

Description

@yoletPig

Summary

Integration of ASLP-lab/M5-TTS — a 50M-param multilingual TTS with multi-token prediction (16 codebooks @ 12.5 fps) and the Qwen3-TTS 12Hz codec — as a native GGUF architecture for RapidSpeech.cpp.

PR: #5

What was done

  • scripts/convert_m5tts_to_gguf.py: converts the M5-TTS checkpoint + Qwen 12Hz codec into a single GGUF (LM weights + codec encoder + codec decoder + llama3 byte-level BPE tokenizer + precomputed RoPE tables)
  • rapidspeech/src/arch/m5tts.{h,cpp} + m5tts_lm.cpp + m5tts_codec.cpp + m5tts_graph.h: full inference architecture implementing the ISpeechModel interface
  • C API whitelist: "m5-tts" added to the TTS architecture list

Pipeline

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

Verification

  • x-asr round-trip on target text: exact match ("你好,欢迎使用我们的语音合成模型。")
  • RTF: 1.46 (CPU 8-thread, WSL2)
  • GGUF models available at: yoleen/M5-TTS-GGUF

Notes

  • The codec encoder uses F16 im2col (ggml limitation) which introduces ~0.1% quantization noise in reference audio encoding, degrading voice-cloning prompt quality slightly
  • Streaming TTS and HTTP server reference-audio endpoints are potential follow-up work

Activity

  1. lovemefan commented on Dec 2, 2026

    @lovemefan
    Member

    Thank you for your contribution 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions