Luigi commited on
Commit
01ffe7a
Β·
verified Β·
1 Parent(s): 7a65071

Upload docs/zh-en-tts-arch-survey-2026.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. docs/zh-en-tts-arch-survey-2026.md +267 -0
docs/zh-en-tts-arch-survey-2026.md ADDED
@@ -0,0 +1,267 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # zh/en Code-Mix TTS Architectures β€” Survey & Nano Design Recommendation (2026-07)
2
+
3
+ > Scope: on-device zh-TW + English **code-mix** TTS (single unified frontend, no language
4
+ > routing; entity-heavy input: numbers/emails/serials) for **Jetson Nano gen-1**.
5
+ > This document surveys small/on-device TTS architecture families (~5–100M params,
6
+ > 2022–2026), analyzes code-mix frontends, characterizes the Nano performance frontier,
7
+ > investigates the measured **Matcha RTF anomaly**, and commits to a keep/evolve/replace
8
+ > verdict for our flagship **MB-iSTFT-VITS (PrimeTTS v2/v2.1, 34.7M, 16 kHz)**.
9
+ > A separate agent owns the streaming variant; streaming is noted here only as a per-arch property.
10
+
11
+ ---
12
+
13
+ ## Executive summary (5 lines)
14
+
15
+ 1. **Keep MB-iSTFT-VITS as the shipped flagship** β€” it is user-approved, hits X-ASR CER 0.027 (beats its 7B teacher), is already ported to RapidSpeech.cpp with CPU parity, and is a defensible fit for a launch-overhead-bound GPU (parallel, single-pass, iSTFT vocoder). No survey candidate dominates it on quality at our size.
16
+ 2. **The Matcha anomaly is real and explainable, not noise**: the sherpa `matcha-icefall-zh-en` model that ran **RTF 0.18** vs our **0.42** is a **3-step CFM acoustic + a Vocos-16 kHz vocoder** β€” an architecture with *far fewer, larger kernel launches* than VITS's normalizing-flow + multiband-decoder stack, which is exactly what a no-CUDA-graph Maxwell GPU rewards.
17
+ 3. **Recommendation = EVOLVE (add a fast lane), do not replace yet**: prototype a **Matcha-class CFM acoustic + Vocos/iSTFT-16 kHz vocoder** reusing our existing g2pw 3-embedding frontend and Xinran/VibeVoice corpus. Target: land the measured ~0.18 RTF (2.3Γ— latency win) and feed the streaming effort (CFM chunks cleanly).
18
+ 4. **Biggest lever is the acoustic model, not the vocoder**: VITS's launch cost is dominated by the inverse **flow** (many small WaveNet coupling ops), so swapping only the vocoder gives partial gain; replacing the flow-based acoustic with a dense CFM U-Net is the structural fix.
19
+ 5. **Frontend stays**: g2pw + phone/tone/lang 3-embedding is state-of-the-practice for zh-TW code-mix; no surveyed system offers a clearly better *small-model* frontend. Keep it; the one migration cost of moving to Matcha is re-deriving durations via MAS (Matcha has no built-in stochastic duration predictor).
20
+
21
+ ---
22
+
23
+ ## 1. Taxonomy of small/on-device TTS architecture families
24
+
25
+ Five families are relevant at 5–100M params. The axis that matters most for Nano is **inference
26
+ pattern** (single-pass parallel vs iterative-few-step vs autoregressive-many-step), because the
27
+ Maxwell GPU is **kernel-launch-overhead-bound** (no CUDA-graph replay on sm_53) and the A57 CPU is
28
+ **fp32-only** (no int8 dot-product, no fp16 arithmetic).
29
+
30
+ ### 1.1 VITS family (end-to-end VAE + flow + GAN vocoder) β€” *where we are*
31
+ - **VITS** (Kim et al. 2021): text encoder β†’ **stochastic** duration predictor β†’ normalizing **flow** (prior↔latent) β†’ HiFiGAN decoder. Single-pass, distributional (does *not* mean-regress prosody). Heavy: many small flow/WaveNet ops.
32
+ - **VITS2** (2023): transformer-in-flow, adversarial duration, better mono alignment; quality up, cost similar.
33
+ - **MB-iSTFT-VITS** (Kawamura et al., ICASSP 2023, arXiv 2210.15975): replaces the most expensive decoder convs with **multi-band generation + inverse STFT**. Paper: **3.4–4.1Γ— faster than VITS**, RTF **0.066 on an Intel i7 CPU**, naturalness on par with VITS. iSTFT alone = 1.8Γ—; +multiband = 1.9–2.3Γ— on top. `Mini-MB-iSTFT-VITS` beats Nix-TTS. **← our PrimeTTS v2/v2.1 arch.**
34
+ - **MeloTTS** (MyShell): VITS/VITS2/**Bert-VITS2** lineage β€” text encoder + **stochastic** duration predictor + BERT linguistic features + HiFiGAN. The **Chinese speaker natively supports zh+en code-mix**. Ships at **44.1 kHz**, which is its on-device weakness (see Β§3).
35
+ - **Piper** (rhasspy): straight VITS configs (x-low/low/medium/high), 22.05 kHz, MIT. The de-facto edge VITS baseline in sherpa-onnx.
36
+ - **Bert-VITS2 / GPT-SoVITS**: VITS backbone + large BERT/LLM conditioning; strong quality but frontend/params balloon past our budget.
37
+
38
+ ### 1.2 Flow-matching / ODE (CFM) β€” *the challenger*
39
+ - **Matcha-TTS** (Mehta et al., ICASSP 2024, arXiv 2309.03199): text encoder + **OT-CFM** decoder whose backbone is a **1D-conv U-Net with a Transformer block per residual stage** (Grad-TTS lineage). First-order Euler ODE; **NFE ≀ 10** (the sherpa zh-en export uses **3 steps**). Deterministic duration (MAS-derived, like FastSpeech) but a **distributional** CFM decoder β†’ avoids the FastSpeech mean-regression wall. No built-in stochastic duration predictor.
40
+ - **matcha-icefall-zh-en** (k2-fsa): the concrete zh/en model β€” `model-steps-3.onnx` (3-step ODE) + **pinyin lexicon** + **`vocos-16khz-univ.onnx`** vocoder, 16 kHz, with zh TN rule-FSTs. **This is the model that measured RTF 0.18 on our Nano.**
41
+ - **Supertonic / Supertonic-2** (Supertone, 2025): **66M**, **ConvNeXt** backbone, speech-autoencoder + **flow-matching** text-to-latent + duration predictor, LARoPE alignment, **~2 inference steps**, ONNX-first, multilingual, on-device focus (claims up to 167Γ— RT on M4 Pro); an int8 sherpa-onnx export exists (2026-03). Apache-ish, ONNX weights public.
42
+ - **F5-TTS / E2-TTS** (2024): DiT flow-matching, ~330M, zero-shot; SEED-TTS-eval **CER 1.56% test-zh**. LLM-scale, not a Nano candidate but the reference for code-switch quality.
43
+ - **VoiceFlow / ReFlow-TTS / StableTTS / RapFlow-TTS (2025)**: rectified-flow / consistency variants pushing NFEβ†’1–2. Direction of travel, not yet a shipped zh/en edge model.
44
+
45
+ ### 1.3 FastSpeech-class (deterministic) + external vocoder β€” *our v1 lineage*
46
+ - FastSpeech2 / LightSpeech / EfficientSpeech: fully parallel, cheapest, but **deterministic β†’ mean-regresses F0/prosody** (our own prior finding: a capacity-independent wall at small scale). Retired for us in favor of distributional models. Listed for completeness / streaming-cheapness.
47
+
48
+ ### 1.4 Small autoregressive / LLM-token TTS β€” *unsuitable for Nano*
49
+ - **MOSS-TTS-Nano (~100M)**, KittenTTS (~15–25M, en, CPU-fast), Parler-mini, OuteTTS, Kani-TTS, VUI, tiny VALL-E derivatives, CosyVoice-1/2/3 (LLM+FM). AR = **one forward pass per codec token = thousands of sequential kernel launches**. On a launch-bound Maxwell with a 2 s kernel watchdog and no CUDA graphs this is the worst-case pattern. Naturally streaming, but latency/RTF on this device is prohibitive. Excluded from the Nano shortlist.
50
+
51
+ ### 1.5 Diffusion / style-diffusion β€” *mixed*
52
+ - **StyleTTS2** (~148M): diffusion only for the *style vector* (cheap), decoder is iSTFTNet β€” but total size and LSTM/duration stack are heavy; weak zh.
53
+ - **Kokoro-82M** (StyleTTS2-derived): **decoder-only, iSTFTNet vocoder, no diffusion at inference**, Apache-2.0, <100 h training data, punches above weight β€” but primarily en/British-en (zh added late and weaker) and its LSTM path is a **launch risk on Maxwell** (prior rejection stands).
54
+ - NaturalSpeech 2/3: on-device infeasible.
55
+
56
+ ### 1.6 Comparison table
57
+
58
+ | Model | Params | SR | Inference pattern | Vocoder | Quality (reported) | On-device fit (Nano) | zh/en mix | Streaming | License |
59
+ |---|---|---|---|---|---|---|---|---|---|
60
+ | **MB-iSTFT-VITS (ours, v2.1)** | 34.7M | 16k | single-pass, distributional | multi-band iSTFT | **X-ASR CER 0.027** (ours); β‰ˆVITS MOS | **Measured RTF 0.42 GPU** / 0.52 CPU@4thr | yes (ours) | yes (agent) | MIT (code) |
61
+ | VITS / VITS2 | 30–40M | 22k | single-pass | HiFiGAN | high MOS | flow = many small ops | via retrain | moderate | MIT |
62
+ | MeloTTS (zh) | ~50–60M | 44.1k | single-pass | HiFiGAN | high MOS | **RTF 2.5@4thr RPi4** (44k kills it) | **yes native** | moderate | MIT |
63
+ | Piper (medium) | ~20–30M | 22k | single-pass | HiFiGAN | good | RTF ~0.35@4thr RPi4 | en-centric | moderate | MIT |
64
+ | vits-icefall-zh-aishell3 | ~29MB | 8k | single-pass | HiFiGAN | ok | **RTF 0.156@4thr RPi4** (8k) | zh | moderate | Apache |
65
+ | **Matcha-TTS (zh-en, 3-step)** | ~18–26M | 16k | **iterative, 3-step CFM** | **Vocos-16k** | β‰ˆVITS MOS; good | **Measured RTF 0.18 GPU** | yes (pinyin) | chunkable | MIT |
66
+ | Supertonic-2 | 66M | 24k+ | 2-step flow, ConvNeXt | speech-AE | high; very fast | ONNX/int8; promising | multilingual | chunkable | open |
67
+ | Kokoro-82M | 82M | 24k | single-pass (no diff) | iSTFTNet | SOTA-small MOS | LSTM launch risk | weak zh | moderate | Apache-2.0 |
68
+ | F5-TTS | ~330M | 24k | many-step DiT flow | Vocos | **CER 1.56 test-zh** | too big | yes | no | MIT |
69
+ | CosyVoice-2/3 | 0.5–1.5B | 24k | AR LLM + FM | β€” | best code-switch | infeasible | best | yes | Apache |
70
+ | MOSS-TTS-Nano | ~100M | β€” | AR codec-token | codec dec | β€” | AR = launch-bound death | β€” | yes | open |
71
+ | FastSpeech2-class | 5–30M | var | single-pass **deterministic** | any | **prosody mean-regresses** | cheapest but flat | via retrain | yes | MIT |
72
+
73
+ *(RPi4 = Cortex-A72, a step above our A57; relative ordering transfers. GPU RTFs are our own Nano measurements.)*
74
+
75
+ ---
76
+
77
+ ## 2. Code-mix (zh/en) frontend analysis
78
+
79
+ **Two frontend philosophies in the field:**
80
+ - **Explicit G2P + phone tokens** (VITS/Matcha/MeloTTS/icefall): a lexicon or G2P maps text to
81
+ phones; language is disambiguated at the *phone* level or via a language tag. Small, deterministic,
82
+ cheap on-device. **← our path.**
83
+ - **Raw text / BPE into an LM** (CosyVoice, F5, Fish/OpenAudio, IndexTTS): the model learns G2P
84
+ implicitly; best code-switch quality but requires LLM-scale params. Not viable at Nano size.
85
+
86
+ **Phone set choices among small open zh/en systems:**
87
+ - `matcha-icefall-zh-en`: **pinyin** lexicon + espeak-ng for English, language handled by lexicon
88
+ entries, tones baked into pinyin tokens.
89
+ - MeloTTS-Chinese: pinyin + **BERT** (`bert-base-multilingual`) linguistic features; en handled by
90
+ the same zh model for code-mix.
91
+ - **Ours**: **g2pw (bopomofo) + g2p_en**, unified into an **88-symbol set with three parallel
92
+ embeddings β€” phone + tone + language**. This is the cleaner design for zh-TW because bopomofo is
93
+ the native Taiwanese notation and separating tone into its own embedding lets the encoder share
94
+ phone identity across tones (better data efficiency at small scale).
95
+
96
+ **Polyphone disambiguation:**
97
+ - **g2pW** (Chen et al., arXiv 2203.10430): conditional weighted-softmax BERT, SOTA on the CPP
98
+ dataset; Taiwan-origin, integrates naturally with bopomofo. **Our choice β€” still SOTA-competitive
99
+ in 2026.**
100
+ - Alternatives (g2pM; 2025 end-to-end BERT G2P, arXiv 2501.01102; G2PL lexicon-adapter): marginal
101
+ accuracy deltas, all still BERT-based. No compelling *smaller/BERT-free* winner has displaced g2pW.
102
+ Note: g2pW's BERT runs **once at frontend time** (host-side in our pipeline), not on the Nano audio
103
+ hot path, so its cost is not a deployment constraint for us.
104
+
105
+ **Tone / language embedding:** best practice at small scale is exactly what we do β€” **separate tone
106
+ embedding** (not tone-tagged phones) + a **language embedding** for accent/consistency control. This
107
+ also gives a knob for the "one voice across languages" accent-consistency goal.
108
+
109
+ **Code-switch prosody & accent:** the literature (SEED-TTS-eval code-switch subset; CosyVoice3
110
+ cross-lingual zh2en/en2zh) shows the hard problems are (a) prosodic continuity across the switch
111
+ boundary and (b) accent leakage. LLM-scale models win here; at our scale the language embedding +
112
+ a single consistent teacher voice (our VibeVoice/Xinran distillation) is the right lever, and our
113
+ measured CER 0.027 says it is working.
114
+
115
+ **Text normalization (entity-heavy):** the field standard is **rule-FST TN** β€” WeTextProcessing /
116
+ the `number-zh.fst`/`date-zh.fst` FSTs shipped with sherpa matcha/vits, or NeMo TN. Rule-based is
117
+ correct for numbers/emails/serials (deterministic, auditable). Keep our rule-based/FST TN; do not
118
+ hand entities to a neural frontend.
119
+
120
+ **Verdict on frontend:** **keep g2pw + 3-embedding.** It is state-of-the-practice for small zh-TW
121
+ code-mix and better-suited to zh-TW than the pinyin-only icefall frontend. The *only* frontend change
122
+ implied by a Matcha migration is duration sourcing (Β§4).
123
+
124
+ ---
125
+
126
+ ## 3. The Nano performance frontier (constraint-driven)
127
+
128
+ Two hard constraints define the sweet spot:
129
+
130
+ - **GPU (Maxwell sm_53, 472 GFLOPS, 2 s watchdog, no CUDA-graph replay):**
131
+ time β‰ˆ `Ξ£(kernel launches) Γ— launch_overhead + compute`. With no graph capture, launch overhead is
132
+ *paid per kernel every inference*. This **rewards fewer, larger, denser ops** (parallel convs,
133
+ U-Net blocks) and **punishes many-small-op graphs** (normalizing flows with stacked WaveNet
134
+ couplings, AR token loops, LSTMs). Our own measurement: the 34.7M conv model **floors at RTF 0.42
135
+ regardless of precision** (F16 GEMM proven neutral) β€” i.e., we are launch-bound, not FLOP-bound.
136
+ - **CPU (Cortex-A57, ARMv8.0, fp32-only):** no int8 sdot, no fp16 arith β†’ **fp32 is the only fast
137
+ path** (ORT-MLAS fp32 RTF 0.52@4thr; int8 either breaks the voice or is slower). This **rewards
138
+ small param counts** and penalizes anything relying on quantization for speed.
139
+ - **Sample rate is a first-order cost multiplier.** sherpa RPi4 numbers make this stark: the same
140
+ VITS family runs **RTF 0.156 @ 8 kHz** (icefall-zh-aishell3) but **RTF 2.5 @ 44.1 kHz**
141
+ (MeloTTS-zh) β€” a ~16Γ— spread driven mostly by vocoder output length. Our **16 kHz** choice is the
142
+ right middle: intelligible for code-mix + entities, without MeloTTS's 44.1 kHz tax.
143
+
144
+ **Where is the sweet spot?** The GPU wants **fewer-larger parallel ops**; the CPU wants **few
145
+ params**; both want **16 kHz** and a **low-launch vocoder (iSTFT/Vocos, not a HiFiGAN upsampling
146
+ stack)**. Our 20–40M conv-parallel iSTFT model sits in the right *region*. The open question the
147
+ survey surfaces is whether, *within* that region, a **dense few-step CFM U-Net** is a better
148
+ launch-profile match than a **normalizing-flow VITS** β€” which is exactly the Matcha anomaly.
149
+
150
+ ---
151
+
152
+ ## 4. The Matcha anomaly investigation
153
+
154
+ **Fact:** on this exact Nano, `matcha-icefall-zh-en` (~18–26M, 3-step) ran **RTF 0.18**; our
155
+ MB-iSTFT-VITS (34.7M) runs **RTF 0.42**. Both are **16 kHz**, so sample rate is *not* the cause.
156
+ Matcha is 2.3Γ— faster despite being an *iterative* (3-pass) model. Why?
157
+
158
+ **Cause 1 β€” kernel-launch count (dominant).** On a no-CUDA-graph Maxwell, runtime tracks *number of
159
+ kernel launches*, not FLOPs. The two graphs differ structurally:
160
+ - **VITS inference path:** text encoder β†’ duration β†’ **inverse normalizing flow** (multiple affine
161
+ coupling blocks, each a WaveNet stack of dilated conv + gate + residual = *many small kernels*) β†’
162
+ multiband-iSTFT decoder (upsampling convs). The **flow is the launch multiplier** β€” dozens of tiny
163
+ ops that each pay full launch overhead and barely use the 472 GFLOPS.
164
+ - **Matcha inference path:** text encoder β†’ 3Γ— **dense U-Net pass** (each pass: a handful of large
165
+ 1D-conv resblocks + transformer blocks over the whole sequence) β†’ **Vocos** vocoder.
166
+
167
+ Even though Matcha runs the decoder **3Γ—**, each pass is a *small number of large, dense kernels* β€”
168
+ high compute-per-launch, which is precisely what Maxwell can absorb (it has FLOPS to spare relative
169
+ to launch overhead). Net launches across a whole utterance are **fewer** than VITS's flow+decoder.
170
+ This is the core of the anomaly: **the 3-step ODE amortizes launches into big dense ops; VITS's flow
171
+ fragments them into small ops.**
172
+
173
+ **Cause 2 β€” the vocoder.** `matcha-icefall-zh-en` uses **Vocos-16 kHz** (arXiv 2306.00814): a
174
+ ConvNeXt backbone that does **all** work at *frame* resolution and upsamples **solely via inverse
175
+ STFT** β€” no temporal-upsampling conv stack. Vocos is reported **~13Γ— faster than HiFiGAN** and ~70Γ—
176
+ faster than BigVGAN. Our multi-band iSTFT vocoder is also efficient (that's why we chose it), but it
177
+ is embedded in the heavier VITS decoder/flow. So part of Matcha's win is a **cleaner, lower-launch
178
+ vocoder**, and part is the acoustic model.
179
+
180
+ **Cause 3 β€” sherpa-onnx runtime.** Both ran under sherpa-onnx/ORT, so the runtime is *not* the
181
+ differentiator here; it's a controlled comparison. (sherpa's graph is well-fused, which helps both.)
182
+
183
+ **Which cause dominates?** The acoustic flow, not the vocoder. Evidence: our own F16-GEMM-neutral
184
+ finding says we're launch-bound, and the flow contributes the majority of small ops in the VITS
185
+ graph. **Corollary: swapping only our vocoder to Vocos would give a partial win; replacing the
186
+ flow-based acoustic with a dense CFM U-Net is the structural fix.** This directly answers the
187
+ orchestrator's question β€” **yes, a flow-matching (CFM) acoustic + our/Vocos iSTFT vocoder is the
188
+ credible next-gen path**, and it is *measured*, not hypothesized: 0.18 vs 0.42 on our silicon.
189
+
190
+ **Streaming implication (for the parallel effort):** CFM/Matcha chunks naturally β€” the encoder output
191
+ and duration are known up front, and the U-Net can be run over sequence windows; Vocos is
192
+ frame-local. This is *more* streaming-friendly than unwinding a VITS flow. Worth flagging to the
193
+ streaming-design agent as a reason the fast lane and the streaming lane may converge.
194
+
195
+ **Caveats before crowning Matcha:**
196
+ - Matcha has **no stochastic duration predictor** β€” durations come from **MAS** at train time (a
197
+ Glow-TTS-style aligner). Our current frontend feeds VITS's internal duration; a Matcha build needs
198
+ an **MAS/alignment stage**. (We already have the MMS-aligner lesson on file: gate on **resynth
199
+ CER**, not duration distribution.)
200
+ - **No warm-start** from our VITS weights into a Matcha U-Net (different arch) β€” the acoustic model
201
+ retrains from scratch. Frontend, corpus, teacher, and TN **do** transfer.
202
+ - **Quality is unproven for our voice.** Our v2.1 is user-approved at CER 0.027; a Matcha rebuild
203
+ risks a prosody/CER regression until tuned (ODE-step count vs quality is a knob: 3 steps is fast
204
+ but 2 vs 4 changes MOS). This is why the verdict is *evolve/prototype*, not *replace*.
205
+
206
+ ---
207
+
208
+ ## 5. Verdict & costed plan
209
+
210
+ ### 5.1 Verdict: **KEEP shipped, EVOLVE a fast lane** (do not replace v2.1 yet)
211
+
212
+ - **Keep MB-iSTFT-VITS (PrimeTTS v2/v2.1)** as the production flagship. Rationale: user-approved,
213
+ CER 0.027 (beats its 7B teacher), already ported to RapidSpeech.cpp with **CPU parity (0.9998)**,
214
+ and its RTF 0.42 GPU / 0.52 CPU is *acceptable*, just not best-in-class. No surveyed model at our
215
+ size demonstrably beats it on **quality**. The A24 shrink (24.8M) remains a valid orthogonal win.
216
+ - **Evolve**: stand up a **Matcha-class CFM acoustic + Vocos-16 kHz vocoder** prototype as the
217
+ next-gen **low-latency lane**, because the 0.18 RTF is *measured on our exact device* β€” a **2.3Γ—
218
+ latency win** that matters for interactivity/streaming and is the correct architectural match to a
219
+ launch-bound Maxwell. Decide replace-vs-coexist **only after** the prototype passes the CER/CMOS
220
+ gate against v2.1.
221
+
222
+ ### 5.2 Prototype architecture (the fast lane)
223
+ - **Frontend:** unchanged β€” g2pw (bopomofo) + g2p_en, phone+tone+lang 3-embedding, rule-FST TN.
224
+ - **Aligner:** MAS/priorgrad to source durations (gate on resynth CER per our aligner lesson).
225
+ - **Acoustic:** Matcha-style CFM β€” text encoder + 1D-conv U-Net (transformer-per-stage) decoder,
226
+ **3-step Euler ODE** (sweep 2/3/4 for the quality/latency knee).
227
+ - **Vocoder:** Vocos-16 kHz (proven low-launch) **or** re-use our multi-band iSTFT (already in
228
+ RapidSpeech.cpp) β€” bench both; Vocos likely wins launches, our iSTFT wins integration.
229
+ - **Params/SR budget:** ~18–26M, **16 kHz** (unchanged), fits ~3.5 GB RAM trivially.
230
+
231
+ ### 5.3 Corpus / warm-start reuse
232
+ - **Reusable:** the Xinran/VibeVoice distillation corpus, the g2pw frontend, the TN FSTs, the eval
233
+ harness (X-ASR CER gate). **Not reusable:** VITS→Matcha weight warm-start (arch mismatch → train
234
+ acoustic from scratch). This is the main *new* training cost.
235
+
236
+ ### 5.4 Cost / benefit / risk
237
+ - **Benefit:** ~2.3Γ— lower GPU latency (0.42β†’~0.18), better streaming fit, aligns with the streaming
238
+ agent's work, modern arch trajectory (Supertonic/Matcha momentum in 2025–26).
239
+ - **Cost:** one from-scratch acoustic train + an MAS aligner stage + Vocos train/finetune; deployment
240
+ work in RapidSpeech.cpp/ORT for a 3-step ODE loop (small).
241
+ - **Risk (ranked):** (1) prosody/CER regression vs a tuned, user-approved v2.1 β€” mitigate by keeping
242
+ v2.1 shipped until the gate passes; (2) ODE-step/quality tradeoff eating the latency win; (3) MAS
243
+ alignment quality (known failure mode β€” gate on resynth CER); (4) teacher-timbre transfer under a
244
+ new acoustic. All are *contained* because v2.1 remains the fallback.
245
+
246
+ ### 5.5 What NOT to do
247
+ - Do **not** adopt MeloTTS as-is (44.1 kHz = RTF 2.5 on ARM). Do **not** chase AR/LLM-token TTS
248
+ (CosyVoice/F5/MOSS-Nano) β€” thousands of sequential launches are the anti-pattern for this GPU.
249
+ Do **not** switch to Kokoro (LSTM launch risk on Maxwell, weak zh). Do **not** replace the frontend.
250
+
251
+ ---
252
+
253
+ ## Sources
254
+ - Matcha-TTS β€” arXiv 2309.03199 (ICASSP 2024): https://arxiv.org/abs/2309.03199 ; system arch: https://deepwiki.com/shivammehta25/Matcha-TTS/2-system-architecture
255
+ - matcha-icefall-zh-en config (3-step, pinyin lexicon, Vocos-16k vocoder) β€” sherpa-onnx pretrained models: https://k2-fsa.github.io/sherpa/onnx/tts/pretrained_models/index.html ; icefall matcha recipe: https://github.com/k2-fsa/icefall/blob/master/egs/ljspeech/TTS/matcha/export_onnx_hifigan.py
256
+ - MB-iSTFT-VITS β€” arXiv 2210.15975 (3.4–4.1Γ— vs VITS, RTF 0.066 i7): https://arxiv.org/abs/2210.15975 ; ar5iv: https://ar5iv.labs.arxiv.org/html/2210.15975 ; repo: https://github.com/MasayaKawamura/MB-iSTFT-VITS
257
+ - iSTFTNet β€” arXiv 2203.02395: https://arxiv.org/pdf/2203.02395
258
+ - Vocos (ConvNeXt + iSTFT, ~13Γ— faster than HiFiGAN) β€” arXiv 2306.00814 (ICLR 2024): https://arxiv.org/abs/2306.00814
259
+ - sherpa-onnx VITS RTF tables (RPi4: melo-zh_en 44.1k RTF 2.5@4thr; piper 22k ~0.35; icefall-zh-aishell3 8k RTF 0.156@4thr): https://k2-fsa.github.io/sherpa/onnx/tts/pretrained_models/vits.html
260
+ - sherpa-onnx TTS overview / DeepWiki: https://deepwiki.com/k2-fsa/sherpa/3.2-tts-models ; repo: https://github.com/k2-fsa/sherpa-onnx
261
+ - MeloTTS (VITS/VITS2/Bert-VITS2, zh speaker does zh+en) β€” model card: https://huggingface.co/myshell-ai/MeloTTS-Chinese ; cpp port: https://github.com/apinge/MeloTTS.cpp
262
+ - g2pW (conditional weighted-softmax BERT, CPP dataset) β€” arXiv 2203.10430: https://arxiv.org/abs/2203.10430 ; 2025 end-to-end BERT G2P: https://arxiv.org/abs/2501.01102
263
+ - Supertonic (66M, ConvNeXt, flow-matching, 2-step, ONNX) β€” https://huggingface.co/Supertone/supertonic-2 ; sherpa int8 export: https://huggingface.co/csukuangfj2/sherpa-onnx-supertonic-tts-int8-2026-03-06
264
+ - Kokoro-82M (StyleTTS2 + iSTFTNet, no diffusion at inference, Apache) β€” https://huggingface.co/hexgrad/Kokoro-82M
265
+ - F5-TTS (flow matching, CER 1.56 test-zh) β€” arXiv 2410.06885: https://arxiv.org/html/2410.06885v1
266
+ - CosyVoice 3 (code-switch/cross-lingual SOTA, LLM+FM) β€” arXiv 2505.17589: https://arxiv.org/pdf/2505.17589
267
+ - SEED-TTS-eval (zh/en + code-switch benchmark) β€” referenced via CosyVoice3/F5 papers above.