hans00 commited on
Commit
151ccf7
·
verified ·
1 Parent(s): 020f398

README: user-facing model card (files, run with codec.cpp tts-cli, license as upstream)

Browse files
Files changed (1) hide show
  1. README.md +76 -113
README.md CHANGED
@@ -1,5 +1,7 @@
1
  ---
2
  license: mit
 
 
3
  language:
4
  - ar
5
  - da
@@ -25,140 +27,101 @@ language:
25
  - tr
26
  - zh
27
  tags:
 
28
  - gguf
 
29
  - tts
30
  - chatterbox
31
  - chatterbox-multilingual
32
- - text-to-speech
33
- - codec-lm
34
- base_model: ResembleAI/chatterbox
35
  ---
36
 
37
- # Chatterbox-Multilingual T3 GGUF
38
-
39
- End-to-end GGUF conversion of [ResembleAI's Chatterbox multilingual T3](https://huggingface.co/ResembleAI/chatterbox) (`t3_mtl23ls_v3.safetensors` — 23-language coverage).
40
-
41
- This release adopts the **native codec_lm split** used by CSM / Qwen3-TTS / MOSS-TTSD:
42
 
43
- - **Backbone (`chatterbox-mtl-t3-<quant>.gguf`)** — stock `llama` arch GGUF of Chatterbox T3's Llama-520M `tfmr.*` weights (30 layers, hidden 1024, 16 heads, head_dim=64, MLP 4096, llama3 RoPE scaling, rope_theta=500000, vocab placeholder = `tokenizer.ggml.model = "none"`). Runs in stock **llama.cpp** with `embeddings=true`.
44
- - **Codec + codec_lm (`chatterbox-mtl-codec-<quant>.gguf`)** — Chatterbox S3G (flow-matching decoder + HiFi-GAN vocoder) bundled with the T3 LM-adaptor side (audio embed table, speech head, text embed/head, learned positional embeddings, cond encoder weights). Runs in [codec.cpp](https://github.com/mybigday/codec.cpp) as a `parallel_heads_delay` codec_lm with `n_cb=1`.
45
- - **S3T tokenizer (`chatterbox-mtl-s3t.gguf`)** — speech tokenizer needed when registering a custom voice from a reference WAV.
46
 
47
- Compared to the earlier release in this repo, the old `t3-*.gguf` (custom shape) and `t3-extras.gguf` are gone — everything the host runtime needs to drive the LM adaptor is now bundled into `chatterbox-mtl-codec-*.gguf` and exposed through codec.cpp's `codec_lm` API.
48
 
49
  ## Files
50
 
51
- ### Backbone (`chatterbox-mtl-t3-<quant>.gguf`)
52
-
53
- | File | Size |
54
- | ----------------------------------- | ------- |
55
- | `chatterbox-mtl-t3-f32.gguf` | 1.9 GB |
56
- | `chatterbox-mtl-t3-f16.gguf` | 961 MB |
57
- | `chatterbox-mtl-t3-bf16.gguf` | 961 MB |
58
- | `chatterbox-mtl-t3-q8_0.gguf` | 511 MB |
59
- | `chatterbox-mtl-t3-q6_k.gguf` | 395 MB |
60
- | `chatterbox-mtl-t3-q5_1.gguf` | 361 MB |
61
- | `chatterbox-mtl-t3-q5_k_m.gguf` | 340 MB |
62
- | `chatterbox-mtl-t3-q5_k_s.gguf` | 331 MB |
63
- | `chatterbox-mtl-t3-q5_0.gguf` | 331 MB |
64
- | `chatterbox-mtl-t3-q4_1.gguf` | 301 MB |
65
- | `chatterbox-mtl-t3-q4_k_m.gguf` | 289 MB |
66
- | `chatterbox-mtl-t3-q4_k_s.gguf` | 273 MB |
67
- | `chatterbox-mtl-t3-q4_0.gguf` | 271 MB |
68
- | `chatterbox-mtl-t3-q3_k_l.gguf` | 254 MB |
69
- | `chatterbox-mtl-t3-q3_k_m.gguf` | 232 MB |
70
- | `chatterbox-mtl-t3-q3_k_s.gguf` | 207 MB |
71
- | `chatterbox-mtl-t3-q2_k.gguf` | 177 MB |
72
-
73
- ### Codec + codec_lm (`chatterbox-mtl-codec-<quant>.gguf`)
74
-
75
- | File | Size |
76
- | ----------------------------------- | ------- |
77
- | `chatterbox-mtl-codec-f32.gguf` | 572 MB |
78
- | `chatterbox-mtl-codec-f16.gguf` | 317 MB |
79
- | `chatterbox-mtl-codec-q8_0.gguf` | 226 MB |
80
- | `chatterbox-mtl-codec-q5_k_m.gguf` | 190 MB |
81
- | `chatterbox-mtl-codec-q4_k_m.gguf` | 178 MB |
82
-
83
- ### S3T speech tokenizer
84
-
85
- `chatterbox-mtl-s3t.gguf` (F16, 237 MB) — needed for **voice-clone**, encodes a reference WAV into the speech token IDs that the codec_lm consumes when registering a custom speaker. Same weights as English Chatterbox.
86
-
87
- ## Text input
88
-
89
- The text passed to codec.cpp must already be prepared the way upstream
90
- `MTLTokenizer.encode` prepares it (minus the BPE step, which codec.cpp does):
91
- lowercase + NFKD, the language-specific conversion (`zh`: Cangjie codes from
92
- `Cangjie5_TC.json`, `ja`: hiragana, ...), then the `[lang]` prefix, e.g.
93
- `[en]hello there.` or `[zh][cj_o][cj_i]...`. Language handling is the
94
- caller's job; codec.cpp does not add or infer the tag.
95
-
96
- ## Defaults and tuning
97
-
98
- All inference knobs are GGUF metadata in `chatterbox-mtl-codec-*.gguf`. Override
99
- them per run with `tts-cli ... --override-kv KEY=TYPE:VALUE` (or the
100
- `kv_overrides` argument of `codec_model_load_from_file_ext`); the T3 sampling
101
- keys also have tts-cli flags.
102
-
103
- | Parameter | Key (tts-cli flag) | This release | Upstream `mtl_tts.generate` | Notes |
104
- |---|---|---|---|---|
105
- | CFM Euler steps | `chatterbox_s3g.flow.n_timesteps` | **6** | 10 | see below |
106
- | CFM classifier-free guidance | `chatterbox_s3g.flow.cfg_rate` | 0.7 | 0.7 | `0` skips the unconditional pass (~1.5x faster S3Gen) at a larger voice drift |
107
- | T3 CFG weight | `codec.lm.chatterbox.sampling.cfg_weight` (`--cfg-weight`) | 0.5 | 0.5 | |
108
- | T3 temperature | `codec.lm.chatterbox.sampling.temperature` (`--temp`) | 0.8 | 0.8 | |
109
- | T3 min-p | `codec.lm.chatterbox.sampling.min_p` (`--min-p`) | 0.05 | 0.05 | |
110
- | T3 top-p | `codec.lm.chatterbox.sampling.top_p` (`--top-p`) | 1.0 | 1.0 | |
111
- | T3 repetition penalty | `codec.lm.chatterbox.sampling.repetition_penalty` (`--rep-penalty`) | **1.2** | 2.0 | see below |
112
- | Emotion exaggeration | `codec.lm.chatterbox.builtin.emotion_adv` / `codec.speaker.emotion_default` | 0.5 | 0.5 | |
113
-
114
- **Why 6 CFM steps.** The S3Gen flow decoder is unrolled over steps × 2 CFG
115
- passes, so its cost is linear in the step count. Measured on CPU (Ryzen AI
116
- MAX+ 395, 12 threads; S3Gen decode of 4 s of audio) and over 3 Chinese + 3
117
- English sentences (Whisper large-v3-turbo CER, CAMPPlus speaker cosine of each
118
- output against the 10-step output):
119
-
120
- | Steps / CFG | S3Gen decode (4 s audio) | CER | Speaker cos vs 10 steps |
121
  |---|---|---|---|
122
- | 10 / 0.7 (upstream) | 6.3 s | 0.6% | 1 |
123
- | **6 / 0.7 (default)** | **4.0 s** | **0.6%** | **0.994** |
124
- | 4 / 0.7 | 2.9 s | 0.6% | 0.974 |
125
- | 6 / 0 | 2.8 s | 0.6% | 0.955 |
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
126
 
127
- 6 steps keeps the voice closest for the time saved. Use 4 steps (or CFG 0) when
128
- latency matters more than speaker fidelity; set 10 to match upstream exactly.
129
- On a Radeon 8060S (Vulkan) the 6-step S3Gen decode of 4 s of audio takes 0.94 s.
130
 
131
- **Why repetition penalty 1.2.** Upstream's 2.0 is paired with its
132
- `AlignmentStreamAnalyzer`, which reads T3's attention maps to force EOS once the
133
- text has been spoken. A llama.cpp backbone exposes no attention maps, so that
134
- guard is absent here; without it 2.0 kept 3 of the 6 test sentences generating
135
- to the frame limit (CER 38%), while 1.2 (the English Chatterbox default) ends
136
- every sentence at CER 0.6%. Raise it only together with a tight `--max-frames`.
137
 
138
- codec.cpp builds older than the configurable CFM schedule / sampling metadata
139
- ignore these keys and fall back to their built-in values.
140
 
141
- ## Inference shape
142
 
143
- Per-frame AR loop, single-codebook `parallel_heads_delay`:
144
 
145
- ```
146
- backbone (Llama-520M, embeddings=true) hidden h
147
- → codec_lm_step_begin(state, h)
148
- → codec_lm_step_logits(0) → sample speech-token → codec_lm_step_push_code
149
- → codec_lm_step_finish → codes[1]
150
- → codec_lm_compose_audio_embd(codes) + speech_pos_emb[step] → next-step embedding
151
- → feed via b.embd; loop until stop_speech_token (6562)
 
152
  ```
153
 
154
- Prompt prefix assembly (text + cond) lives inside codec.cpp's chatterbox path; the host application doesn't directly touch `lm.chatterbox.*` tensors.
155
 
156
- ## Sources
157
 
158
- - Upstream model: [`ResembleAI/chatterbox`](https://huggingface.co/ResembleAI/chatterbox) (`t3_mtl23ls_v3.safetensors`)
159
- - Conversion tooling: [`mybigday/codec.cpp`](https://github.com/mybigday/codec.cpp) (`prep_chatterbox_t3` + `lm_adaptor/chatterbox.py` + `ChatterboxS3GConverter` with `lm_source`)
160
- - Inference runtime: [`mybigday/llama.rn`](https://github.com/mybigday/llama.rn)
161
 
162
- ## Supported languages
163
 
164
- Arabic, Danish, German, Greek, English, Spanish, Finnish, French, Hebrew, Hindi, Italian, Japanese, Korean, Malay, Dutch, Norwegian, Polish, Portuguese, Russian, Swedish, Swahili, Turkish, Chinese (23 total).
 
1
  ---
2
  license: mit
3
+ base_model: ResembleAI/chatterbox
4
+ pipeline_tag: text-to-speech
5
  language:
6
  - ar
7
  - da
 
27
  - tr
28
  - zh
29
  tags:
30
+ - codec.cpp
31
  - gguf
32
+ - text-to-speech
33
  - tts
34
  - chatterbox
35
  - chatterbox-multilingual
36
+ - voice-cloning
 
 
37
  ---
38
 
39
+ # Chatterbox Multilingual — GGUF
 
 
 
 
40
 
41
+ [ResembleAI's Chatterbox Multilingual](https://huggingface.co/ResembleAI/chatterbox): expressive speech in 23 languages, with voice cloning.
 
 
42
 
43
+ Runs offline with [codec.cpp](https://github.com/mybigday/codec.cpp) on CPU or GPU (CUDA, Vulkan, Metal).
44
 
45
  ## Files
46
 
47
+ Every run needs **one model file + one codec file** from this repo.
48
+
49
+ | | `--backbone` | `--model` (codec) | Total |
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
50
  |---|---|---|---|
51
+ | Recommended | `chatterbox-mtl-t3-q8_0.gguf` | `chatterbox-mtl-codec-q8_0.gguf` | 854 MB |
52
+ | Smallest | `chatterbox-mtl-t3-q4_k_m.gguf` | `chatterbox-mtl-codec-q4_k_m.gguf` | 494 MB |
53
+ | Best quality | `chatterbox-mtl-t3-f16.gguf` | `chatterbox-mtl-codec-f16.gguf` | 1.6 GB |
54
+
55
+ `chatterbox-mtl-s3t.gguf` is only for codec.cpp builds older than 2026-10; current codec files include it.
56
+
57
+ <details>
58
+ <summary>Other files</summary>
59
+
60
+ | File | Size |
61
+ |---|---|
62
+ | `chatterbox-mtl-codec-f32.gguf` | 1.2 GB |
63
+ | `chatterbox-mtl-codec-q5_k_m.gguf` | 224 MB |
64
+ | `chatterbox-mtl-s3t.gguf` | 247 MB |
65
+ | `chatterbox-mtl-t3-bf16.gguf` | 1.0 GB |
66
+ | `chatterbox-mtl-t3-f32.gguf` | 2.0 GB |
67
+ | `chatterbox-mtl-t3-q2_k.gguf` | 185 MB |
68
+ | `chatterbox-mtl-t3-q3_k_l.gguf` | 265 MB |
69
+ | `chatterbox-mtl-t3-q3_k_m.gguf` | 242 MB |
70
+ | `chatterbox-mtl-t3-q3_k_s.gguf` | 217 MB |
71
+ | `chatterbox-mtl-t3-q4_0.gguf` | 283 MB |
72
+ | `chatterbox-mtl-t3-q4_1.gguf` | 315 MB |
73
+ | `chatterbox-mtl-t3-q4_k_s.gguf` | 285 MB |
74
+ | `chatterbox-mtl-t3-q5_0.gguf` | 346 MB |
75
+ | `chatterbox-mtl-t3-q5_1.gguf` | 378 MB |
76
+ | `chatterbox-mtl-t3-q5_k_m.gguf` | 356 MB |
77
+ | `chatterbox-mtl-t3-q5_k_s.gguf` | 346 MB |
78
+ | `chatterbox-mtl-t3-q6_k.gguf` | 413 MB |
79
+
80
+ </details>
81
+
82
+
83
+ ## Run
84
+
85
+ With [codec.cpp](https://github.com/mybigday/codec.cpp)'s `tts-cli` ([build it](https://github.com/mybigday/codec.cpp#text-to-speech), then):
86
+
87
+ ```bash
88
+ hf download BricksDisplay/Chatterbox-Multilingual-TTS-GGUF chatterbox-mtl-t3-q8_0.gguf chatterbox-mtl-codec-q8_0.gguf --local-dir Chatterbox-Multilingual-TTS
89
+
90
+ ./build/tts-cli synthesize --backbone Chatterbox-Multilingual-TTS/chatterbox-mtl-t3-q8_0.gguf --model Chatterbox-Multilingual-TTS/chatterbox-mtl-codec-q8_0.gguf \
91
+ --text "[en]hello, this is chatterbox speaking." --output out.wav
92
+ ```
93
+
94
+ Clone a voice from a few seconds of clean speech (it works across languages):
95
 
96
+ ```bash
97
+ ./build/tts-cli synthesize ... --ref-audio my_voice.wav --text "[en]hello there." --output out.wav
98
+ ```
99
 
100
+ All `tts-cli` options (voices, voice cloning, sampling, GPU) are described in the [codec.cpp README](https://github.com/mybigday/codec.cpp#text-to-speech).
 
 
 
 
 
101
 
 
 
102
 
103
+ ## Input text
104
 
105
+ Prepare the text as upstream `MTLTokenizer` does:
106
 
107
+ 1. lowercase it and apply Unicode **NFKD** normalization,
108
+ 2. for Japanese, convert to hiragana; for Chinese, convert to Cangjie codes
109
+ (plain Chinese characters are not pronounced correctly),
110
+ 3. prefix the language tag: `[en]`, `[fr]`, `[de]`, `[es]`, `[ja]`, `[zh]`, …
111
+
112
+ ```python
113
+ import unicodedata
114
+ text = "[es]" + unicodedata.normalize("NFKD", "Hola, ¿cómo estás hoy?".lower())
115
  ```
116
 
117
+ Skipping NFKD makes accented letters (é, ó, ü, …) come out wrong.
118
 
119
+ ## Voices
120
 
121
+ - Builtin voice: `default`.
122
+ - Voice cloning: `--ref-audio` with any short, clean clip. Save it with
123
+ `--save-speaker` to reuse it without the clip.
124
 
125
+ ## License
126
 
127
+ `mit`, the same as the [original model](https://huggingface.co/ResembleAI/chatterbox).