Neural Audio Codecs, Residual Vector Quantization (RVQ), and Full-Duplex Speech-Language Foundation Models in 2026: Whisper, EnCodec, AudioLM, VALL-E, and Moshi
Why did spoken language systems evolve from fragile, multi-second cascaded pipelines—chaining separate Voice Activity Detection (VAD), Automatic Speech Recognition (ASR), text-only Large Language Models (LLMs), and spectrogram vocoder Text-to-Speech (TTS) modules—into unified discrete neural audio codec language models and full-duplex speech-text foundation models capable of conversing with 160 ms theoretical latency (200 ms in practice)?
Raw digital audio is an extraordinarily dense time-series signal. A single monophonic 16-bit pulse-code modulated (PCM) waveform sampled at 24,000 Hz outputs 24,000 integer samples per second, where each sample spans $2^{16} = 65,536$ possible quantization levels (arXiv:2301.02111, Section 3). Even after applying a non-linear $\mu$-law companding transformation to compress each amplitude step to $256$ levels (as in WaveNet, van den Oord et al., 2016), the temporal sequence length remains unreduced at $16,000$ to $24,000$ steps per second—rendering standard quadratic self-attention $\mathcal{O}(T^2)$ completely intractable across multi-minute spoken interactions (arXiv:2209.03143, Section II). Conversely, cascading an ASR model into a text LLM and out through a traditional Mel-spectrogram TTS vocoder creates three fundamental bottlenecks (arXiv:2410.00037, Section 1):
- Compounding Multi-Second Latency: Sequential transcription, full-turn text generation, and acoustic synthesis stack into several seconds of turn-around delay, far above the 230 ms average inter-turn response latency measured across 10 human languages (Stivers et al., 2009;
arXiv:2410.00037). - The Textual Information Bottleneck: Collapsing user speech into plain text strips out all paralinguistic and acoustic cues—speaker timbre, emotional prosody, emphasis, hesitation, laughter, and ambient acoustic events.
- Rigid Turn-Based Segmentation: Traditional voice pipelines assume dialogue consists of mutually exclusive single-speaker turns, breaking down in the presence of interruptions, backchannel interjections ("OK", "I see"), and overlapping speech—which accounts for 10% to 20% of natural human conversation time (Çetin & Shriberg, 2006;
arXiv:2410.00037).
Between 2022 and 2026, five foundational architectural breakthroughs resolved both the sequence-length wall of raw waveforms and the latency/paralinguistic bottleneck of cascaded pipelines:
- Web-Scale Weakly Supervised Multitask Speech Recognition (
Whisper, Radford et al.,arXiv:2212.04356): Scaling an encoder-decoder Transformer on 680,000 hours of weakly supervised internet audio (117,000 hours across 96 non-English languages and 125,000 hours of $X \to \text{en}$ speech translation) using 80-channel log-Mel spectrograms downsampled by a stride-2 convolutional stem to 20 ms temporal resolution. Evaluating zero-shot across 14 speech recognition benchmarks, Whisper Large V2 (1,550M parameters) matches supervised wav2vec 2.0 Large on in-distribution LibriSpeech test-clean (2.7% WER each; best zero-shot Whisper achieves 2.5% WER) while cutting out-of-distribution average Word Error Rate from 29.3% to 12.8%—a 55.2% average Relative Error Reduction (RER)—and achieving a new zero-shot state of the art of 29.1 BLEU on CoVoST2 $X \to \text{en}$ translation. - Streaming Neural Audio Compression with Residual Vector Quantization and Gradient Loss Balancing (
EnCodec, Défossez et al.,arXiv:2210.13438): Compressing 24 kHz monophonic and 48 kHz stereophonic waveforms through a strided 1D convolutional encoder-decoder ($320\times$ temporal downsampling to 75 frames/second at 24 kHz, yielding 13.3 ms initial streaming latency and 9.8x / 10.4x real-time CPU encoding/decoding speed) coupled with Residual Vector Quantization (RVQ) across up to 32 hierarchical codebooks ($N = 1024$ entries, 10 bits each), a Multi-Scale Complex STFT (MS-STFT) Discriminator, and an exponential-moving-average Gradient Loss Balancer. At just 3.0 kbps (1.9 kbps after 5-layer Transformer arithmetic entropy coding, a 25–40% bitrate reduction), EnCodec achieves 67.0 MUSHRA on clean speech and 89.6 MUSHRA on music, outperforming Lyra-v2 at 6.0 kbps (66.2 / 75.7) and Opus at 12.0 kbps (76.5 / 77.8)—while at 12.0 kbps (8.9 kbps entropy-coded) it reaches 90.6 MUSHRA on clean speech. - Hybrid Semantic-Acoustic Tokenization for Textless Audio Generation (
AudioLM, Borsos et al.,arXiv:2209.03143): Exposing the fundamental information dichotomy between self-supervised masked language model representations and neural codec tokens on 16 kHz speech: w2v-BERT XL (0.6B) layer-7 $k$-means tokens ($K=1024$ at 25 Hz / 250 bps) yield strong phonetic discriminability (6.7% within-speaker / 7.6% across-speaker ABX error rate) but poor waveform reconstruction (1.1 ViSQOL), whereas SoundStream RVQ acoustic tokens (50 Hz, $Q=12$ layers at 6,000 bps) achieve high waveform fidelity (3.9 ViSQOL) but poor phonetic discriminability (17.8% / 26.6% ABX). By chaining three 0.3B decoder-only Transformer stages—(1) autoregressive semantic modeling $p(z_t | z_{<t})$, (2) coarse acoustic modeling ($Q'=4$ layers, 2,000 bps), and (3) fine acoustic modeling ($Q - Q' = 8$ layers, 6,000 bps)—AudioLM trained on 60,000 hours of untranscribed Libri-Light audio achieves 83.7% in-vocab sWUGGY and 64.7% sBLIMP syntactic accuracy, retains 92.6% speaker classification accuracy from a 3-second prompt, and fools human listeners in a 1,000-rating subjective Turing test (51.2% identification rate, $p = 0.23$). - Zero-Shot In-Context Text-to-Speech via Autoregressive + Non-Autoregressive Codec Language Modeling (
VALL-E, Wang et al.,arXiv:2301.02111): Recasting TTS from continuous Mel-spectrogram regression into conditional discrete language modeling over a $750 \times 8$ EnCodec acoustic code matrix (24 kHz, 6 kbps, 75 Hz, $Q=8$ quantizers) scaled to 60,000 hours of LibriLight speech (~7,000 speakers). An Autoregressive (AR) Transformer generates the first RVQ codebook $\mathbf{c}{:,1}$ conditioned on phoneme prompts $\mathbf{x}$ and a 3-second acoustic enrollment prefix $\tilde{\mathbf{C}}{:,1}$, while a Non-Autoregressive (NAR) Transformer modulated via Adaptive Layer Normalization (AdaLN) predicts codebooks $j \in [2, 8]$ in 7 parallel $\mathcal{O}(1)$ stages. With just a 3-second unseen speaker prompt, VALL-E achieves 5.9% WER (3.8% continual), 0.580 WavLM-TDNN speaker similarity (vs. 0.337 for YourTTS), 4.38 SMOS (+0.93 over YourTTS, within 0.12 of GroundTruth's 4.50), and +0.23 CMOS over YourTTS (+0.04 CMOS over human ground truth on VCTK). - Real-Time Full-Duplex Spoken Dialogue via Split-RVQ Semantic Distillation, Multi-Stream RQ-Transformers, and Inner Monologue (
Moshi&Mimi, Défossez et al.,arXiv:2410.00037): Combining Helium (a 7B-parameter text LLM pre-trained on 2.1T English tokens achieving 54.3% MMLU), Mimi (a fully causal 24 kHz neural codec operating at 12.5 Hz / 80 ms frame stride and 1.1 kbps with $Q=8, N_A=2048$, a Split RVQ that distills WavLM-Large semantics into a parallel plain VQ alongside a 7-level acoustic RVQ, and pure adversarial training reaching 81.0 MUSHRA and 8.7% ABX), a hierarchical Temporal + Depth RQ-Transformer modeling $K = 2Q + 1 = 17$ parallel streams (system + user audio with no speaker-turn boundaries), and Inner Monologue (predicting time-aligned text tokens withPAD/EPADas a per-frame prefix before audio tokens). Inner Monologue slashes transcript negative log-likelihood from 3.65 to 2.77, expands coherent generation length from 602 to 1,920 characters, and nearly triples 0-shot Spoken Question Answering accuracy to 26.6% on Web Questions, 62.3% on LlaMA-Questions, and 22.8% on Audio TriviaQA (vs. 9.2%, 21.0%, 7.3% without Inner Monologue, and crushing SpeechGPT 7B's 6.5%, 21.6%, 14.8%).
- ✓Whisper 680,000-Hour Weakly Supervised Effective Robustness (arXiv:2212.04356): Training an encoder-decoder Transformer (39M Tiny to 1,550M Large) on 680,000 hours of internet speech reduces average out-of-distribution Word Error Rate across 14 benchmarks from 29.3% (wav2vec 2.0 Large) to 12.8% (Whisper Large V2)—a 55.2% relative error reduction—while achieving 29.1 BLEU zero-shot on CoVoST2 $X \to \text{en}$ translation and halving multilingual Fleurs WER for every 16× increase in training hours ($R^2 = 0.83$).
- ✓EnCodec 75 Hz RVQ Compression & Gradient Loss Balancer (arXiv:2210.13438): Strided causal 1D convolutions ($2 \times 4 \times 5 \times 8 = 320\times$ hop) with Residual Vector Quantization ($N_q \le 32, N=1024$), a Multi-Scale STFT discriminator, and gradient norm balancing achieve 67.0 Clean Speech MUSHRA and 89.6 Music MUSHRA at 3.0 kbps (1.9 kbps entropy-coded) with 13.3 ms initial latency and ~10× real-time CPU throughput, outperforming Lyra-v2 at 6 kbps and Opus at 12 kbps.
- ✓AudioLM Semantic vs. Acoustic Disentanglement (arXiv:2209.03143): Combining 25 Hz w2v-BERT XL layer-7 semantic tokens (250 bps, 6.7%/7.6% ABX error, 1.1 ViSQOL) with 50 Hz 12-layer SoundStream acoustic tokens (6,000 bps, 3.9 ViSQOL, 17.8%/26.6% ABX) across 3 hierarchical 0.3B Transformer stages yields 83.7% in-vocab sWUGGY, 64.7% sBLIMP, 92.6% speaker retention, and 51.2% human Turing test discrimination ($p=0.23$).
- ✓VALL-E AR + 7-Stage AdaLN NAR Zero-Shot TTS (arXiv:2301.02111): Scaling conditional EnCodec language modeling to 60,000 hours of LibriLight enables 3-second zero-shot voice cloning with 5.9% WER (3.8% continual), 0.580 WavLM-TDNN speaker similarity (vs. 0.337 YourTTS), 4.38 SMOS (+0.93 over YourTTS), and +0.04 CMOS over human ground truth on 60 VCTK speakers.
- ✓Moshi & Mimi 12.5 Hz Full-Duplex Speech-to-Speech (arXiv:2410.00037): Distilling WavLM into a 12.5 Hz (80 ms), 1.1 kbps causal Split-RVQ codec (Mimi, 81.0 MUSHRA, 8.7% ABX) and modeling 17 parallel user/system streams via a 7B Temporal + 6-layer Depth RQ-Transformer with Inner Monologue achieves 160 ms theoretical (200 ms practical) full-duplex latency and 62.3% 0-shot LlaMA-Questions accuracy.
Zero-shot average WER drops from 29.3% (wav2vec 2.0 Large) to 12.8% across 14 ASR datasets (arXiv:2212.04356).
12.5 Hz (80 ms frame) causal semantic-acoustic codec with WavLM distillation & adversarial training (arXiv:2410.00037).
60K-hour AR+NAR EnCodec LM achieves +0.93 SMOS over YourTTS (3.45) and 5.9% WER on LibriSpeech (arXiv:2301.02111).
17-stream RQ-Transformer with Inner Monologue beats human 230ms conversational response latency (arXiv:2410.00037).
Web-Scale Weakly Supervised Speech Recognition & Multitask Tokenization (Whisper, arXiv:2212.04356)
Before speech could be unified with large-scale generative language models, researchers had to resolve a paradox that plagued self-supervised speech encoders such as wav2vec 2.0 (Baevski et al., 2020) and BigSSL (Zhang et al., 2021). While unsupervised pre-training scaled raw audio encoders up to 1,000,000 hours of unlabeled speech, those encoders lacked a pre-trained generative decoder mapping latent audio representations to text (arXiv:2212.04356, Section 1). Consequently, every downstream deployment required dataset-specific supervised fine-tuning on tiny academic corpora (typically ~1,000 hours, or 5,140 hours across 7 combined datasets in SpeechStew, Chan et al., 2021).
As Alec Radford, Jong Wook Kim, Tao Xu, Greg Brockman, Christine McLeavey, and Ilya Sutskever demonstrate in Robust Speech Recognition via Large-Scale Weak Supervision (arXiv:2212.04356, Section 1 & Section 3.3), models fine-tuned on narrow gold-standard benchmarks such as LibriSpeech achieved an apparent 1.4% Word Error Rate (WER) on in-distribution test-clean (a 73% drop below Deep Speech 2's 5.3% WER and the 5.8% human-level benchmark), yet suffered catastrophic error spikes—making more than twice as many errors as a human—whenever evaluated out-of-distribution on noisy, accented, or conversational audio.
1. The 680,000-Hour Multitask Dataset and Machine-Transcript De-Contamination
To eliminate dataset-specific fine-tuning altogether, Radford et al. (arXiv:2212.04356, Section 1 & Section 2.1) scaled weakly supervised internet audio-transcript pairs by an order of magnitude beyond prior 10,000–30,000-hour efforts to 680,000 hours of labeled audio:
- Multilingual Coverage: Of the 680,000 total hours, 117,000 hours span 96 non-English languages (75 languages with dedicated speech recognition supervision, 99 total language tokens in the vocabulary).
- Speech Translation Supervision: 125,000 hours consist of non-English speech paired with English transcripts ($X \to \text{en}$ speech translation, including 68,000 hours covering the CoVoST2 languages versus only 861 hours in the CoVoST2 training set).
- Automated Anti-"Transcript-ese" Filtering (
arXiv:2212.04356, Section 2.1): Because training on machine-generated ASR output degrades sequence-to-sequence models, the pipeline strips out synthetic captions using punctuation/casing heuristics (rejecting all-uppercase, all-lowercase, or comma-free rule-based inverse-text-normalized transcripts), verifies spoken-language vs. CLD2 transcript-language alignment via a VoxLingua107 audio language detector (routing mismatched audio + English text pairs into $X \to \text{en}$ translation), performs fuzzy transcript de-duplication, and segments audio into 30-second windows (retaining sub-sampled no-speech segments for Voice Activity Detection training).
2. Encoder-Decoder Spectrogram Stem and Unified Multitask Control Tokens
Rather than introducing a custom neural backbone, Whisper (arXiv:2212.04356, Section 2.2 & Table 1) adopts a homogeneous pre-activation residual Encoder-Decoder Transformer (with tied input-output decoder embeddings and a GPT-2 byte-level BPE tokenizer refitted for multilingual text):
- 80-Channel Log-Mel Spectrogram Frontend: All waveform inputs are resampled to 16,000 Hz, converted into 80-channel log-magnitude Mel spectrograms over 25-millisecond windows with a 10-millisecond stride (100 frames/second), and globally scaled to $[-1, 1]$ with zero dataset mean.
- 2-Layer Stride-2 Convolutional Stem (20 ms Native Frame Resolution): Two 1D convolution layers with filter width 3 and GELU activations process the 80-channel spectrogram. Because the second convolution uses a stride of 2, the temporal sequence length is halved from 100 Hz (10 ms) to 50 Hz (20 ms per encoder token) before sinusoidal positional embeddings and the encoder Transformer blocks are applied.
- Single-Sequence Multitask Decoder Formatting (
arXiv:2212.04356, Section 2.3 & Figure 1): Whisper replaces separate VAD, language ID, alignment, inverse text normalization, and ASR/translation modules with a single autoregressive decoder conditioned on structured prefix control tokens:
$$\texttt{<|startoftranscript|>} \;\to\; \texttt{<|LANGUAGE\_99|>} \;\text{or}\; \texttt{<|nospeech|>} \;\to\; \texttt{<|transcribe|>} \;\text{or}\; \texttt{<|translate|>} \;\to\; \texttt{<|notimestamps|>} \;\text{or}\; \texttt{<|0.00|>}\;\text{text}\;\texttt{<|t\_end|>}\;\dots\;\texttt{<|endoftranscript|>}$$
Every timestamp token is quantized to the nearest 20 milliseconds, matching the native 50 Hz stride of the convolutional encoder stem. Models are trained in FP16 with AdamW across a batch size of 256 segments (30 seconds each) for $2^{20}$ updates (~1,048,576 steps, or 2–3 passes over the 680,000-hour dataset, with a 2,048-step linear warmup; Whisper Large V2 trains for $2.5\times$ more epochs with SpecAugment, Stochastic Depth, and BPE Dropout; arXiv:2212.04356, Section 2.4).
| Whisper Model Size / Benchmark | Architecture (Layers / Width / Heads / Params) | wav2vec 2.0 Large (no LM) WER (%) | Zero-Shot Whisper Large V2 WER (%) | Relative Error Reduction (RER %) |
|---|---|---|---|---|
| Whisper Tiny / Base / Small | 4L-384d-6H (39M) / 6L-512d-8H (74M) / 12L-768d-12H (244M) | — (Tiny LibriSpeech Clean: 6.7%) | — | Tiny 39M matches supervised SOTA OOD |
| Whisper Medium / Large (V2) | 24L-1024d-16H (769M) / 32L-1280d-20H (1550M) | 2.7% (LibriSpeech Clean ref.) | 2.7% (2.5% best Whisper) | 0.0% (In-Distribution Reference) |
| Artie / Common Voice / Fleurs En | Out-of-Distribution Accented & Crowdsourced Speech | 24.5% / 29.9% / 14.6% | 6.2% / 9.0% / 4.4% | 74.7% / 69.9% / 69.9% |
| Tedlium / CHiME6 / VoxPopuli En | Talks, Far-Field Dining-Room Array & Parliamentary Audio | 10.5% / 65.8% / 17.9% | 4.0% / 25.5% / 7.3% | 61.9% / 61.2% / 59.2% |
| CORAAL / AMI IHM / Switchboard | Regional Interviews, Headset Meetings & Telephony | 35.6% / 37.0% / 28.3% | 16.2% / 16.9% / 13.8% | 54.5% / 54.3% / 51.2% |
| CallHome / WSJ / AMI SDM1 / LS-Other | Spontaneous Phone, Financial Dictation, Single Distant Mic | 34.8% / 7.7% / 67.6% / 6.2% | 17.6% / 3.9% / 36.4% / 5.2% | 49.4% / 49.4% / 46.2% / 16.1% |
| 14-Dataset Average & Scaling Law | 3,405h → 54,486h → 681,070h (En WER: 30.5 → 10.9 → 9.9%) | 29.3% Average WER | 12.8% Average WER | 55.2% Average RER |
3. Dataset Scaling Laws, Positive Multitask Transfer, and Long-Form Decoding Heuristics
Whisper's empirical ablations (arXiv:2212.04356, Sections 3.4–4.5, Tables 3–7) established four foundational properties used across modern speech-language pipelines (including Moshi's 7-million-hour transcription pipeline):
- Log-Linear Language Scaling ($R^2 = 0.83$): Evaluating zero-shot WER across languages on Fleurs reveals a squared correlation coefficient of $R^2 = 0.83$ between $\log(\text{WER})$ and $\log(\text{pre-training hours})$, proving that WER halves for every $16\times$ increase in language-specific training data (
arXiv:2212.04356, Section 3.4). On Multilingual LibriSpeech (MLS), zero-shot Whisper achieves 7.3% WER (outperforming supervised XLS-R 1B at 10.9% and mSLAM-CTC 2B at 9.7%), while on CoVoST2 $X \to \text{en}$ speech translation (Table 4), zero-shot Whisper reaches 29.1 BLEU overall (36.2 High-resource, 32.6 Mid-resource, 25.2 Low-resource), beating Maestro (25.2 BLEU) and mSLAM-CTC (24.8 BLEU) and surging +6.7 BLEU ahead of mSLAM on low-resource languages (25.2 vs. 18.5 BLEU). - Subsampled Dataset Scaling (Table 6): Training Whisper Medium on subsampled fractions ($0.5\%, 1\%, 2\%, 4\%, 8\%, 100\%$) from 3,405 hours to 681,070 hours drives 12-dataset English WER from 30.5% (3,405h) $\to$ 19.6% (6,811h) $\to$ 14.4% (13,621h) $\to$ 12.3% (27,243h) $\to$ 10.9% (54,486h) $\to$ 9.9% (681,070h), Fleurs multilingual WER from 92.4% $\to$ 72.7% $\to$ 56.6% $\to$ 45.0% $\to$ 36.4% $\to$ 29.2%, and CoVoST2 translation from 0.2 BLEU (3,405h) $\to$ 1.7 (6,811h) $\to$ 7.9 (13,621h) $\to$ 13.9 (27,243h) $\to$ 19.2 (54,486h) $\to$ 24.8 BLEU (681,070h). Furthermore, while joint multilingual/multitask training exhibits negative transfer at small compute scales (where only 65% of FLOPs go to English ASR), at large model scales joint models outperform English-only models (
arXiv:2212.04356, Figure 9). - Long-Form Buffered Decoding Cascade (Table 7): Because the encoder consumes fixed 30-second windows, reliable transcription of multi-hour recordings (TED-LIUM3, Meanwhile, Kincaid46, Rev16, Earnings-21, Earnings-22, CORAAL) layers five interventions on top of greedy decoding (11.0% average WER): (1) 5-beam log-probability search (10.6% WER), (2) temperature fallback starting at $0.0$ and stepping by $+0.2$ up to $1.0$ whenever average token log-probability drops below $-1.0$ or the generated text's gzip compression ratio exceeds $2.4$ (10.6% WER), (3) joint Voice Activity Detection combining
<|nospeech|>probability $> 0.6$ with average log-prob $< -1.0$ (10.2% WER), (4) previous-text conditioning when decoding temperature $< 0.5$ (10.0% WER), and (5) initial timestamp constraint in $[0.0, 1.0]\text{ s}$ (10.0% average WER—reducing TED-LIUM3 to 3.51%, Kincaid46 to 8.41%, Earnings-21 to 9.73%, Earnings-22 to 12.6%, and CORAAL to 19.1%, within 1.15 percentage points of computer-assisted professional human transcription on Kincaid46).
Streaming Neural Audio Compression: Residual Vector Quantization (RVQ), MS-STFT Discriminators, and Gradient Loss Balancing (EnCodec, arXiv:2210.13438)
While Whisper solved speech-to-text transcription, generating high-fidelity speech or general audio with a language model requires an invertible discrete bottleneck that compresses waveforms by two to three orders of magnitude in sequence length without sacrificing perceptual fidelity or real-time CPU latency. In High Fidelity Neural Audio Compression (arXiv:2210.13438), Alexandre Défossez, Jade Copet, Gabriel Synnaeve, and Yossi Adi introduced EnCodec, establishing the standard discrete audio tokenizer later adopted by VALL-E, AudioCraft / MusicGen, and refined into Mimi for Moshi.
1. Strided 1D Convolutional + LSTM Encoder-Decoder and 13.3 ms Causal Streaming
Given an input audio waveform $\bm{x} \in [-1, 1]^{C_a \times T}$ sampled at $f_{\text{sr}} \in \{24\text{ kHz}, 48\text{ kHz}\}$ (arXiv:2210.13438, Section 3.1), EnCodec's encoder $E$ maps $\bm{x}$ into a continuous latent tensor $\bm{z} \in \mathbb{R}^{D \times T'}$:
- Convolutional Downsampling Cascade: The encoder begins with a 1D convolution ($C = 32$ channels, kernel size $7$), followed by $B = 4$ residual convolutional blocks with ELU activations. Each block contains a residual unit (two kernel-3 convolutions with a skip connection) followed by a strided downsampling convolution with strides $\bm{S} = (2, 4, 5, 8)$ and kernel size $K = 2S$, doubling the channel count at every downsampling stage. The $B=4$ blocks are followed by a two-layer LSTM for sequential modeling and a final 1D convolution (kernel size $7$, $D$ output channels).
- 320x Frame Rate Reduction (
75 Hzat 24 kHz,150 Hzat 48 kHz): Because the product of the four convolutional strides is $2 \times 4 \times 5 \times 8 = \mathbf{320}$, a 24,000 Hz waveform is compressed to $24,000 / 320 = \mathbf{75\text{ latent frames per second}}$ (one frame every 13.33 ms, or 320 audio samples). At 48,000 Hz stereo, the encoder outputs 150 latent frames per second. - Streamable vs. Non-Streamable Padding & Normalization (
arXiv:2210.13438, Section 3.1 & Table 3): In the streamable setup, all $K - S$ convolution padding is placed causally before the first time step and layer normalization over time is replaced by Weight Normalization, allowing the codec to emit the first 320 samples (13.3 ms) immediately upon receiving the first 320 input samples. In the non-streamable setup, padding is split symmetrically across 1-second chunks with 10 ms overlap and time-domain Layer Normalization, trading a 1-second initial latency for a slight objective quality gain at 6 kbps (7.46 SI-SNR / 4.39 ViSQOL non-streamable vs. 6.67 SI-SNR / 4.35 ViSQOL streamable, both vastly outperforming Opus at 2.45 SI-SNR / 2.60 ViSQOL and EVS at 1.89 SI-SNR / 2.74 ViSQOL).
2. Residual Vector Quantization (RVQ), Variable-Bandwidth Training, and Transformer Entropy Coding
To convert the continuous encoder output $\bm{z} \in \mathbb{R}^{B \times D \times T'}$ into discrete tokens without an exponential explosion in codebook size, EnCodec (arXiv:2210.13438, Section 3.2) applies Residual Vector Quantization (RVQ) across $N_q$ cascaded codebooks, each containing $N = 1024$ centroid vectors ($\log_2(1024) = \mathbf{10\text{ bits per codebook}}$). At stage $c \in \{1, \dots, N_q\}$, the quantizer $q_c(\cdot)$ projects the unquantized residual $\bm{z}c$ onto its nearest centroid in codebook $c$ and passes the new residual $\bm{z}{c+1} = \bm{z}_c - q_c(\bm{z}_c)$ to stage $c+1$:
$$\bm{z}1 = E(\bm{x}), \qquad \bm{z}{c+1} = \bm{z}c - q_c(\bm{z}_c), \qquad \bm{z}_q = \sum{c=1}^{N_q} q_c(\bm{z}c), \qquad l_w = \sum{c=1}^{N_q} \big\|\bm{z}_c - q_c(\bm{z}_c)\big\|_2^2$$
Codebook vectors are updated via an exponential moving average (EMA) with decay 0.99, dead codes are restarted from current-batch samples, gradients flow back to the encoder via the Straight-Through Estimator (STE), and the encoder minimizes the VQ commitment loss $l_w$ (arXiv:2210.13438, Equation 3).
- Multi-Bandwidth Quantizer Dropout (
1.5to24 kbps): At 24 kHz ($75\text{ Hz}$ frame rate, $10\text{ bits/codebook} \implies 750\text{ bps per codebook}$), a single EnCodec model supports up to $N_q = 32$ codebooks (16 codebooks at 48 kHz). During training, $N_q \in \{2, 4, 8, 16, 32\}$ is sampled per batch along with a dedicated per-bandwidth discriminator, yielding target bitrates of 1.5, 3.0, 6.0, 12.0, and 24.0 kbps from a single checkpoint. - 5-Layer Transformer Entropy Coding (25–40% Bandwidth Reduction, Section 3.3): An optional lightweight causal Transformer LM (5 layers, 8 heads, $d = 200$ channels, FFN dimension $800$, 3.5-second causal receptive field) sums the learned embeddings of the $N_q$ tokens from step $t-1$ and predicts $N_q$ independent 1024-way logit distributions at step $t$. Paired with a range-based arithmetic coder (probabilities rounded to $10^{-6}$ precision with total range width $2^{24}$), entropy coding shrinks bitrates by 25% to 40% without altering the reconstructed waveform—compressing 1.5 kbps $\to$ 0.9 kbps, 3.0 kbps $\to$ 1.9 kbps, 6.0 kbps $\to$ 4.1 kbps, and 12.0 kbps $\to$ 8.9 kbps at 24 kHz (
arXiv:2210.13438, Table 1).
3. Multi-Scale Complex STFT Discriminator and the Gradient Loss Balancer
Training neural audio codecs with competing time-domain $L_1$ loss $\ell_t(\bm{x}, \hat{\bm{x}}) = \|\bm{x} - \hat{\bm{x}}\|1$, multi-scale 64-bin Mel-spectrogram $L_1 + L_2$ loss $\ell_f$ across window sizes $2^i$ ($i \in \{5, \dots, 11\}$, hop $2^i/4$), hinge-loss adversarial generator loss $\ell_g$, and normalized discriminator feature-matching loss $\ell{\text{feat}}$ is notoriously unstable because discriminator gradient norms fluctuate wildly across training steps (arXiv:2210.13438, Section 3.4).
Défossez et al. solve this with two innovations:
- Single Multi-Scale Complex STFT (MS-STFT) Discriminator (Table 2): Replacing SoundStream's dual raw-waveform Multi-Scale Discriminator + Mono-STFT setup (62.91 MUSHRA, 5.99 SI-SNR, 4.22 ViSQOL) or HiFi-GAN's Multi-Period Discriminator (60.7 MUSHRA) with 5 complex-valued 2D convolutional sub-discriminators operating at STFT window lengths $[2048, 1024, 512, 256, 128]$ (concatenating real and imaginary components, with time dilation rates $1, 2, 4$) lifts perceptual quality to 77.5 MUSHRA, 6.67 SI-SNR, and 4.35 ViSQOL (79.0 MUSHRA when combined with MPD).
- Gradient Norm Loss Balancer (
arXiv:2210.13438, Equation 5): Instead of backpropagating the raw weighted sum $\sum_i \lambda_i g_i$ where $g_i = \frac{\partial \ell_i}{\partial \hat{\bm{x}}}$, EnCodec normalizes each loss gradient by its exponential moving average L2 norm $\langle \|g_i\|2 \rangle\beta$ ($\beta = 0.999$, reference norm $R = 1$):
$$\tilde{g}i = R \frac{\lambda_i}{\sum_j \lambda_j} \cdot \frac{g_i}{\big\langle \|g_i\|_2 \big\rangle\beta}$$
With $\lambda_t = 0.1, \lambda_f = 1, \lambda_g = 3, \lambda_{\text{feat}} = 3$ at 24 kHz ($\sum \lambda_j = 7.1$), each weight $\lambda_i / \sum_j \lambda_j$ directly specifies the exact fraction of the total generator gradient contributed by loss $\ell_i$, completely decoupling hyperparameter tuning from natural loss scales.
| Codec / Configuration (24 kHz & 48 kHz) | Nominal / Entropy-Coded Bitrate | Clean Speech MUSHRA | Noisy Speech MUSHRA | Music Set-1 / Set-2 MUSHRA | Latency & CPU Real-Time Factor (RTF) |
|---|---|---|---|---|---|
| Uncompressed Reference (24 kHz 16-bit) | 384.0 kbps (1×) | 95.5 ± 1.6 | 93.9 ± 1.8 | 93.2 ± 2.5 / 97.1 ± 1.3 | 48 kHz Stereo Ref: 95.1 ± 1.8 MUSHRA |
| Opus (6.0 kbps / 12.0 kbps) | 6.0 kbps / 12.0 kbps | 30.1 / 76.5 | 19.1 / 61.9 | 20.6 / 77.8 & 17.9 / 65.4 | 48 kHz Stereo 6 / 24 kbps: 17.7 / 82.9 |
| 3GPP EVS (9.6 kbps) & Lyra-v2 (3 / 6 kbps) | 9.6 kbps / 3.0 & 6.0 kbps | 84.4 / 53.1 & 66.2 | 80.0 / 52.0 & 59.9 | 89.9 / 69.3 & 75.7 (Set-1) | Lyra-v2 32 kHz RTF: 27.4× Enc, 67.2× Dec |
| EnCodec 24 kHz Streamable (2 / 4 RVQ) | 1.5 → 0.9 / 3.0 → 1.9 kbps | 49.2 / 67.0 ± 1.5 | 41.3 / 62.5 ± 2.3 | 68.2 / 89.6 & 66.5 / 87.8 | 3 kbps beats Lyra-v2 6 kbps & Opus 12 kbps |
| EnCodec 24 kHz Streamable (8 / 16 RVQ) | 6.0 → 4.1 / 12.0 → 8.9 kbps | 83.1 / 90.6 ± 2.6 | 69.4 / 80.1 ± 2.5 | 92.9 / 91.8 & 91.3 / 92.9 | 13.3 ms latency | 9.8× Enc / 10.4× Dec (1.6× EC) |
| EnCodec 48 kHz Stereo (256× / 128× / 64×) | 6→4.2 / 12→8.9 / 24→19.4 kbps | — (Stereo Music) | — (Stereo Music) | 82.9 / 88.0 / 87.5 MUSHRA | 1s latency | 6.8× Enc / 5.1× Dec (matches MP3 64k: 82.7) |
Semantic vs. Acoustic Disentanglement & Hierarchical Generative Audio Modeling (AudioLM, arXiv:2209.03143)
Why can't an unconditioned autoregressive Transformer simply be trained directly on flattened SoundStream or EnCodec RVQ acoustic tokens to generate coherent speech?
In AudioLM: a Language Modeling Approach to Audio Generation (arXiv:2209.03143, Section III-B), Zalán Borsos et al. performed that exact experiment: they flattened 50 Hz SoundStream RVQ tokens ($Y \in \{1, \dots, 1024\}^{T_A \times Q}$) in row-major order and trained a decoder-only Transformer to continue a 4-second speech prompt. While the generated audio preserved the speaker's vocal timbre and room acoustics, the linguistic content collapsed into incoherent babbling (arXiv:2209.03143, Section III-B).
1. The Phonetic Discriminability (ABX) vs. Waveform Reconstruction (ViSQOL) Trade-Off
To explain why pure acoustic token LMs babble whereas pure self-supervised unit LMs (like GSLM, Lakhotia et al., 2021) lose speaker identity and sound robotic, Borsos et al. (arXiv:2209.03143, Table I & Figure 3) measured triphone ABX phonetic discriminability error rate (within-speaker and across-speaker on LibriSpeech dev-clean) against ViSQOL reconstruction quality on 16 kHz waveforms across two distinct tokenizers:
- Semantic Tokens (
w2v-BERT XL, 0.6B Conformer, Layer 7 $k$-Means): Extracted from the 7th intermediate layer of the masked language modeling (MLM) module of a 0.6B-parameter w2v-BERT model (arXiv:2209.03143, Section III-B & IV-B) downsampled by $640\times$ to 25 Hz (one 1024-d vector every 40 ms). After normalizing each dimension to zero mean and unit variance and clustering via $k$-means with $K = 1024$ centroids (10 bits $\times$ 25 Hz = 250 bps), these semantic tokens achieve a remarkably low 6.7% within-speaker and 7.6% across-speaker ABX error rate (5.6% / 6.2% when residual-quantized to 6,000 bps), proving they encode invariant phonetic and lexical structure. However, training a SoundStream decoder to invert them yields an unusable 1.1 ViSQOL at 250 bps (1.4 ViSQOL at 6,000 bps) and a speaker classification accuracy of just 3.2% across 291 LibriSpeech speakers (Table III, near the $100 / 291 = 0.3\%$ random chance baseline). - Acoustic Tokens (
SoundStream, 12-Layer RVQ at 50 Hz): Downsampling 16 kHz audio by $2 \times 4 \times 5 \times 8 = 320\times$ to 50 Hz (one frame every 20 ms) with $Q = 12$ RVQ layers ($N = 1024$ entries per layer $\implies 600\text{ tokens/s} = \mathbf{6,000\text{ bps}}$; coarse $Q' = 4$ layers = 2,000 bps), SoundStream tokens achieve high waveform fidelity (3.3 ViSQOL at 2,000 bps and 3.9 ViSQOL at 6,000 bps) and 100.0% speaker classification accuracy (Table III), but suffer from poor phonetic invariance (22.4% / 28.7% ABX error at 2,000 bps and 17.8% / 26.6% ABX error at 6,000 bps).
2. Three-Stage Coarse-to-Fine Autoregressive Factorization
AudioLM (arXiv:2209.03143, Section III-C & Figure 2) resolves this trade-off by factoring speech generation into three sequential autoregressive stages, each parameterized by an identical 0.3B-parameter decoder-only Transformer (12 layers, 16 heads, $d = 1024$, FFN $4096$, dropout $0.1$, T5 relative positional embeddings, trained on 60,000 hours of Libri-Light unlab-60k):
$$\underbrace{p(z_t \mid z_{<t})}{\text{Stage 1: Semantic LM (25 Hz, 250 bps, 30s crops, } \tau=0.6\text{)}} \;\longrightarrow\; \underbrace{p\big(y_t^q \mid z{1:T_S},\; y_{<t}^{\le Q'},\; y_t^{<q}\big){q=1}^{Q'=4}}{\text{Stage 2: Coarse Acoustic LM (50 Hz, 2000 bps, 10s crops, } \tau=0.8\text{)}} \;\longrightarrow\; \underbrace{p\big(y_t^q \mid y_{1:T_A}^{\le Q'},\; y_{<t}^{>Q'},\; y_t^{<q}\big){q=5}^{Q=12}}{\text{Stage 3: Fine Acoustic LM (50 Hz, 6000 bps, 3s chunks, } \tau=0.6\text{)}}$$
Because the 50 Hz SoundStream frame rate is exactly twice the 25 Hz w2v-BERT semantic frame rate, each semantic token $z_t$ aligns with $2 Q' = 8$ coarse acoustic tokens in Stage 2 and $2(Q - Q') = 16$ fine acoustic tokens in Stage 3 (arXiv:2209.03143, Figure 2). Furthermore, because fine acoustic details ($q \in [5, 12]$) are conditionally independent of semantic tokens given the coarse acoustic tokens $y^{\le 4}$, Stage 3 drops $z$ completely and operates on non-overlapping 3-second windows.
Empirical evaluations in arXiv:2209.03143 (Tables II, III, IV & Sections IV-G–IV-I) confirm:
- Lexical & Syntactic Probing Without Text Supervision (Table IV): On ZeroResource Challenge 2021 benchmarks (10,000 sWUGGY pairs and 6,300 sBLIMP pairs), AudioLM achieves 71.5% (all) / 83.7% (in-vocab) on sWUGGY and 64.7% on sBLIMP (67.5% unnormalized)—surpassing causal GSLM (68.7% in-vocab sWUGGY / 57.1% sBLIMP), non-causal HuBERT-only (70.9% / 79.8% / 59.5%), and CPC-BERT (80.0% / 59.9%), and even outperforming the supervised Forced Alignment BERT topline on sBLIMP (63.7%).
- Intelligibility, 92.6% Unseen Speaker Retention & 51.2% Human Indistinguishability: Transcribing AudioLM's acoustic generation (conditioned on ground-truth semantic tokens across 2.2 hours of LibriSpeech
test-clean) with Conformer Transducer-L yields 3.4% CER and 6.0% WER (vs. 2.9% CER / 6.6% WER for single-speaker GSLM, and 0.9% CER / 2.6% WER for direct SoundStream reconstruction; Table II). When continuing a 3-second prompt from an unseen speaker for 7 seconds, speaker classification accuracy jumps from 3.2% (unprompted) to 92.6% (Table III). Across 1,000 ratings by 10 professional English raters judging 10-second clips, humans distinguished AudioLM continuations from real SoundStream-compressed human recordings only 51.2% of the time (binomial $p = 0.23$, statistically indistinguishable from a 50% coin toss)—while a dedicated 6-block log-Mel CNN classifier detected AudioLM synthetic audio with 98.6% accuracy (arXiv:2209.03143, Section IV-H).
Conditional Codec Language Modeling for Zero-Shot In-Context TTS (VALL-E, arXiv:2301.02111)
While AudioLM proved that discrete codec tokens could synthesize realistic speech continuations, it required 3 separate autoregressive stages over flattened RVQ tokens and did not accept text/phoneme input for controllable Text-to-Speech (TTS). In Neural Codec Language Models are Zero-Shot Text to Speech Synthesizers (arXiv:2301.02111), Chengyi Wang et al. introduced VALL-E, scaling TTS training data by nearly two orders of magnitude from $<1,000$ hours to 60,000 hours of LibriLight English speech (~7,000 unique speakers, force-aligned to phonemes at a 30 ms frame shift via a Kaldi hybrid DNN-HMM trained on 960h LibriSpeech) and treating zero-shot voice cloning as GPT-style in-context prompting over EnCodec acoustic token matrices.
1. Hybrid Autoregressive (AR) + 7-Stage AdaLN Non-Autoregressive (NAR) Factorization
Using off-the-shelf 24 kHz EnCodec at 6.0 kbps (arXiv:2301.02111, Section 3 & Section 4.1), any audio waveform $\mathbf{y}$ of duration $d$ seconds is discretized at 75 Hz ($320\times$ downsampling) across $Q = 8$ RVQ quantizers ($1024$ entries each) into a two-dimensional acoustic code matrix $\mathbf{C}^{T \times 8} = \text{Encodec}(\mathbf{y})$ where $T = 75 d$ (e.g., a 10-second utterance becomes a $750 \times 8$ matrix).
Generating all $750 \times 8 = 6,000$ tokens sequentially would be prohibitively slow, yet predicting the temporal length $T$ non-autoregressively fails to capture speaker-dependent speaking rate and prosody. VALL-E (arXiv:2301.02111, Section 4.2, Equations 1–5) factors the joint conditional distribution $p(\mathbf{C} \mid \mathbf{x}, \tilde{\mathbf{C}}; \theta)$ given a target phoneme sequence $\mathbf{x}$ and a 3-second enrolled acoustic prompt matrix $\tilde{\mathbf{C}}^{T' \times 8}$ ($T' = 225$ frames) into two coupled 12-layer Transformers (each with 12 layers, 16 heads, $d = 1024$, FFN $4096$, dropout $0.1$, trained for 800k steps on 16 V100 32GB GPUs):
$$p(\mathbf{C} \mid \mathbf{x}, \tilde{\mathbf{C}}; \theta) = \underbrace{\left(\prod_{t=0}^{T} p\big(\mathbf{c}{t, 1} \mid \mathbf{c}{<t, 1},\; \tilde{\mathbf{c}}{:, 1},\; \mathbf{x};\; \theta{\text{AR}}\big)\right)}{\text{Stage 1: Causal AR Transformer on RVQ Level 1 } (\mathcal{O}(T)\text{ sampling})} \cdot \underbrace{\left(\prod{j=2}^{8} p\big(\mathbf{c}{:, j} \mid \mathbf{C}{:, <j},\; \mathbf{x},\; \tilde{\mathbf{C}};\; \theta_{\text{NAR}}\big)\right)}_{\text{Stage 2: Bidirectional AdaLN NAR Transformer on Levels 2..8 } (7 \times \mathcal{O}(1)\text{ greedy})}$$
- Autoregressive (AR) First-Quantizer Model ($\theta_{\text{AR}}$): A causal decoder-only Transformer concatenates the phoneme sequence $\mathbf{x} \langle\text{EOS}\rangle$ and the first RVQ codebook sequence $\mathbf{c}{:,1} \langle\text{EOS}\rangle$ (sharing weights between the acoustic embedding $W_a$ and output projection). During training, no explicit prompt split is needed—any prefix $\mathbf{c}{<t,1}$ acts as an in-context prompt for $\mathbf{c}{\ge t,1}$. At inference, the enrolled 3-second recording's phonemes and first-layer codes $\tilde{\mathbf{c}}{:,1}$ are prepended, and $\mathbf{c}_{:,1}$ is decoded via sampling (avoiding beam-search repetition loops while enabling prosodic diversity and flexible utterance duration).
- Non-Autoregressive (NAR) Residual-Quantizer Model ($\theta_{\text{NAR}}$): Once $\mathbf{c}{:,1}$ fixes the sequence length $T$ and coarse prosody, the bidirectional NAR Transformer runs 7 parallel $\mathcal{O}(1)$ greedy passes for quantizer stages $i \in [2, 8]$. At stage $i$, the model embeds and sums all 8 codebooks of the 3-second acoustic prompt ($\mathbf{e}{\tilde{c}t} = \sum{j=1}^8 e_{\tilde{c}{t,j}}$) together with the already-predicted codebooks $1 \dots i-1$ of the target utterance ($\mathbf{e}{c_t} = \sum_{j=1}^{i-1} W_a^j \odot c_{t,j}$), injecting the active quantizer index $i$ into every Transformer block via Adaptive Layer Normalization (
AdaLN) (arXiv:2301.02111, Section 4.2.2):
$$\text{AdaLN}(h, i) = a_i \text{LayerNorm}(h) + b_i$$
where scale $a_i$ and shift $b_i$ are projected linearly from the stage embedding $i$, and the $j$-th output prediction head shares weights with the $(j+1)$-th acoustic embedding table $W_a^{j+1}$.
| System / Ablation Variant (`arXiv:2301.02111`) | LibriSpeech WER (↓) | LibriSpeech WavLM-TDNN SPK (↑) | LibriSpeech SMOS / CMOS | VCTK Unseen SPK (3s / 5s / 10s) | VCTK 60-Speaker SMOS / CMOS |
|---|---|---|---|---|---|
| GroundTruth Human Speech | 2.2% | 0.754 | 4.50 ± 0.10 / +0.17 | 0.528 / 0.556 / 0.586 (108-spk: 0.546/0.591/0.620) | 4.29 ± 0.09 / -0.04 |
| GSLM / AudioLM (Speech-to-Speech) | 12.4% / 6.0% | 0.126 / — | — | — | — |
| YourTTS (Zero-Shot TTS Baseline) | 7.7% | 0.337 | 3.45 ± 0.09 / -0.12 | 0.331 / 0.337 / 0.344 (108-spk*: 0.357/0.377/0.394) | 3.70 ± 0.09 / -0.23 |
| VALL-E (3s Enrolled Unseen Speaker) | 5.9% | 0.580 | 4.38 ± 0.10 / 0.00 | 0.389 / 0.380 / 0.414 (108-spk: 0.382/0.423/0.484) | 3.81 ± 0.09 / 0.00 (+0.04 vs GT) |
| VALL-E-continual (3s GT Prefix) | 3.8% | 0.508 | — | — | — |
| NAR & AR Prompt Ablations (Tables 4–5) | NAR no-prompt: 19.6% → phn: 3.0% → 2-prompts: 2.8% | NAR SPK: 0.518 → 0.541 → 0.732 | AR w/o acoustic prompt: SPK drops 0.585 → 0.236 | Proves AR prefix + NAR 8-codebook prompt are both required | Preserves emotion (EmoV-DB) & reverb |
Real-Time Full-Duplex Spoken Dialogue: Helium, Mimi Split-RVQ, Multi-Stream RQ-Transformers, and Inner Monologue (Moshi, arXiv:2410.00037)
Even with EnCodec, AudioLM, and VALL-E, true real-time spoken dialogue remained out of reach. Early speech-text LLMs such as SpeechGPT (Zhang et al., 2023) and Spectron (Nachmani et al., 2024) relied on a "Chain-of-Modality"—generating the entire response as text tokens before synthesizing speech tokens—which made streaming voice interaction impossible (arXiv:2410.00037, Section 2). Meanwhile, AudioPaLM (Rubenstein et al., 2023), VoxtLM (Maiti et al., 2023), TWIST (Hassid et al., 2023), and Spirit-LM (Nguyen et al., 2024) modeled only single-stream semantic tokens (requiring an external single-speaker vocoder), and dGSLM (Nguyen et al., 2023) modeled two-speaker semantic streams offline without a text LLM backbone or acoustic tokens.
In Moshi: a speech-text foundation model for real-time dialogue (arXiv:2410.00037), Alexandre Défossez, Laurent Mazaré, Manu Orsini, Amélie Royer, Patrick Pérez, Hervé Jégou, Edouard Grave, and Neil Zeghidour (Kyutai) introduced Moshi, unifying a 7B text LLM backbone (Helium), a 12.5 Hz causal semantic-acoustic codec (Mimi), a multi-stream hierarchical RQ-Transformer, and time-aligned Inner Monologue to achieve full-duplex speech-to-speech dialogue with 160 ms theoretical latency (200 ms in practice).
flowchart TD
subgraph UserStream["User Input Stream (Always Listening, 24 kHz)"]
U_WAV["User Waveform x' (24 kHz, 80 ms frame)"] --> MIMI_ENC["Mimi Causal Encoder: SeaNet Conv (4,5,6,8)x2 + 8-Layer RoPE Transformer (12.5 Hz)"]
MIMI_ENC --> SPLIT_RVQ_U["Split RVQ (1.1 kbps): 1 Semantic VQ (A'_{s,1}) + 7 Acoustic RVQ (A'_{s-tau, 2..8})"]
end
subgraph MoshiCore["Moshi Joint 17-Stream RQ-Transformer (12.5 Hz / 80 ms Step)"]
SPLIT_RVQ_U --> SUM_EMB["Sum 17 Stream Embeddings V_{s-1, 1..17} at Step s"]
SUM_EMB --> TEMP_TR["Temporal Transformer (Helium 7B: 32L, d=4096, 32H, RoPE, 3000 steps / 4-5 min)"]
TEMP_TR -->|"Temporal Context z_s"| LIN_TEXT["Linear Head k=1: Sample Inner Monologue Text Token W_s (PAD / EPAD / Word)"]
TEMP_TR -->|"z_s + W_s"| DEPTH_TR["Depth Transformer (6L, d=1024, 16H, Per-Codebook Weights k=2..17)"]
LIN_TEXT --> DEPTH_TR
DEPTH_TR -->|"Sample k=2..9"| MOSHI_TOK["Moshi Semantic Token A_{s,1} + Delayed Acoustic Tokens A_{s-tau, 2..8} (tau=1)"]
end
subgraph MoshiOutput["Moshi Output Stream (Always Generating Speech or Natural Silence)"]
MOSHI_TOK --> MIMI_DEC["Mimi Causal Decoder: 8-Layer RoPE Transformer + Transposed SeaNet Conv"]
MIMI_DEC --> M_WAV["Moshi Output Waveform x (24 kHz, 80 ms frame, 160 ms theoretical / 200 ms practical latency)"]
end1. The Helium 7B Text Foundation Backbone (2.1T Tokens)
To ground spoken dialogue in strong factual reasoning, Kyutai pretrained Helium, a 7B-parameter Transformer (arXiv:2410.00037, Section 3.2 & Table 1: 32 layers, $d = 4096$, MLP dimension $11,264$, 32 attention heads, RMSNorm, RoPE, SiLU Gated Linear Units, FlashAttention, 4,096-token context, and a 32,000-token SentencePiece unigram tokenizer with single-digit splitting and byte backoff). Helium is trained for 500,000 steps at a batch size of 4.2M tokens (2.1 Trillion tokens total, peak LR $3 \cdot 10^{-4}$ with cosine decay) on a mixture of 12.5% curated corpora (5 Wikipedia dumps from 2017–2022, Wikibooks, Wikisource, Wikinews, StackExchange, and peS2o scientific articles) and 87.5% filtered CommonCrawl across 10 crawls (deduplicated via line-level FNV-1a Bloom filters and 3-line fuzzy fastText classifiers, filtered for English $>0.85$ fastText threshold, and scored by a 9-category domain-quality fastText classifier; Section 3.2.2 & 4.1).
As shown in Table 2 of arXiv:2410.00037, among 7B models trained on $< 2.5\text{T}$ tokens, Helium (54.3% 5-shot MMLU, 79.6% ARC-Easy, 55.9% ARC-Challenge, 53.6% OpenBookQA, 76.3% HellaSwag, 70.0% WinoGrande, 79.4% PIQA, 51.0% SIQA, 59.9%/72.6% TriviaQA, 23.3% Natural Questions) decisively outperforms Llama 2 7B (45.3% MMLU, 45.9% ARCc), OLMo 7B (52.0% MMLU, 42.5% ARCc), MPT 7B (30.8% MMLU), and Falcon 7B (28.0% MMLU).
2. The Mimi Neural Audio Codec: 12.5 Hz Causal Bottleneck Transformers, Split-RVQ WavLM Distillation, and Adversarial-Only Training
If an audio codec runs at 75 Hz (EnCodec) or 50 Hz (SoundStream / SpeechTokenizer / SemantiCodec) with $Q = 8$ codebooks, generating 1 second of audio requires 400 to 600 tokens/second—or 30,000 tokens even at 12.5 Hz over 5 minutes—creating an insurmountable latency wall for a 7B Transformer (arXiv:2410.00037, Section 3.3 & 3.4.1). Mimi (arXiv:2410.00037, Section 3.3, Tables 3–4) solves this through four architectural innovations:
- 1,920x Causal Downsampling to
12.5 Hz(80 msFrame Step,1.1 kbpsBitrate): Mimi's causal SeaNet convolutional encoder applies 4 strided blocks with strides $(4, 5, 6, 8)$ followed by a final stride-2 1D convolution ($4 \times 5 \times 6 \times 8 \times 2 = \mathbf{1,920}$ total stride), mapping 24,000 Hz audio to 12.5 frames/second ($D = 512$, projected to 256-d for quantization) where every frame spans exactly 80 ms. Discretizing with $Q = 8$ codebooks of size $N_A = 2048$ (11 bits/codebook) yields an ultra-compact bitrate of $12.5 \times 8 \times 11 = \mathbf{1,100\text{ bps (1.1 kbps)}}$. - 8-Layer Causal Bottleneck Transformers: An 8-layer causal Transformer (8 heads, $d = 512$, MLP $2048$, GELU, RoPE, LayerScale initialized at $0.01$, 250-frame / 20s context, trained with AdamW, LR $8 \cdot 10^{-4}$, weight decay $5 \cdot 10^{-2}$ on Transformer weights, batch size 128 on 12s windows for 4M steps) is placed immediately before quantization in the encoder and immediately after quantization in the decoder, junto with a 50% sequence-level quantization rate during training.
- Split RVQ to Eliminate Semantic-Acoustic Residual Interference (
arXiv:2410.00037, Section 3.3.2 & Figure 2): To make Mimi causal while retaining phonetic discriminability, Mimi distills non-causal WavLM-Large embeddings (16 kHz, 50 Hz, 1024-d, non-causally average-pooled with kernel size 8 and stride 4 to 12.5 Hz) into its first quantizer via cosine distance after a 1024-d linear projection. However, as Table 3 proves, distilling WavLM into the first level of a single 8-level RVQ improves ABX error from 23.3% to 6.5% at the cost of degrading reconstruction MUSHRA from 65.9 to 57.8, because levels 2–8 must reconstruct acoustic residuals of a semantically distorted first quantizer. Mimi introduces a Split RVQ: a parallel 1-level Semantic VQ (distilling WavLM) plus a 7-level Acoustic RVQ, whose outputs are summed before the decoder—restoring MUSHRA to 64.0 (68.3 without 50% quantization rate) while maintaining 8.1% / 8.0% ABX. - Adversarial-Only Training (
81.0 MUSHRAat1.1 kbps, Table 4): Removing spectral reconstruction losses during codec training and keeping only the MS-STFT discriminator hinge loss and feature-matching loss causes objective ViSQOL to drop from 2.82 to 1.84, yet surges human perceptual MUSHRA from 58.8 to 81.0 (77.7 downsampled at 16 kHz, 3.10 MOSNet, 8.7% ABX)—outperforming RVQGAN 1.5 kbps at 75 Hz (31.3 MUSHRA), SpeechTokenizer 1.5 kbps at 50 Hz (45.1 MUSHRA), SemantiCodec 1.3 kbps at 50 Hz (64.8 MUSHRA, 42.2% ABX), and even SpeechTokenizer 4.0 kbps at 50 Hz (74.3 MUSHRA).
| Tokenizer / Neural Audio Codec | Sample Rate / Frame Rate | Bitrate & Causality | Phonetic ABX Error (↓) | ViSQOL / MOSNet (↑) | Human MUSHRA Score (↑) |
|---|---|---|---|---|---|
| Ground Truth Reference (`arXiv:2410.00037` Table 4) | 24 kHz / — | Uncompressed | — | — / 3.08 | 90.6 ± 1.0 |
| w2v-BERT XL Semantic (`arXiv:2209.03143` Table I) | 16 kHz / 25 Hz (40 ms) | 250 bps / Non-Causal | 6.7% (within) / 7.6% (across) | 1.1 / — (6 kbps: 1.4) | Poor inversion (3.2% speaker ID) |
| SoundStream Acoustic (`arXiv:2209.03143` Table I) | 16 kHz / 50 Hz (20 ms) | 2.0 / 6.0 kbps (Causal) | 22.4/28.7% (2k) | 17.8/26.6% (6k) | 3.3 (2k) / 3.9 (6k) | 100.0% speaker ID retention |
| RVQGAN / SemantiCodec (`arXiv:2410.00037` Table 4) | 24k / 75 Hz & 16k / 50 Hz | 1.5 / 1.3 kbps (Non-Causal) | — / 42.2% | 1.74 / 2.74 & 2.43 / 3.12 | 31.3 ± 1.3 / 64.8 ± 1.5 |
| SpeechTokenizer (3 RVQ / 8 RVQ) | 16 kHz / 50 Hz (20 ms) | 1.5 / 4.0 kbps (Non-Causal) | 3.3% / 3.3% | 1.53 / 2.67 & 3.07 / 3.10 | 45.1 ± 1.5 / 74.3 ± 1.5 |
| Mimi (Split-RVQ, Rec + Adv Loss) | 24 kHz / 12.5 Hz (80 ms) | 1.1 kbps / Causal ✓ | 8.1% (Single RVQ: 6.5%) | 2.82 / 2.89 | 58.8 ± 1.8 (Table 3: 64.0 / 68.3) |
| Mimi (Split-RVQ, Adversarial-Only Loss) | 24 kHz / 12.5 Hz (80 ms) | 1.1 kbps / Causal ✓ | 8.7% | 1.84 / 3.10 | 81.0 ± 1.3 (16 kHz: 77.7 ± 1.4) |
3. Hierarchical RQ-Transformer, Multi-Stream Full-Duplex Modeling, and Inner Monologue
At each 12.5 Hz (80 ms) frame step $s \in \{1, \dots, S\}$ (up to $S = 3,000\text{ steps} = 4\text{ min}$ in training and 5 minutes at evaluation), Moshi (arXiv:2410.00037, Section 3.4, Equations 1–7) models a joint multi-sequence vector $V_s = (V_{s,1}, \dots, V_{s,K})$ of depth $K = 2Q + 1 = 17$ tokens ($Q = 8$ Mimi codebooks for Moshi's speech $A_{s,q}$, $Q = 8$ Mimi codebooks for the user's speech $A'_{s,q}$, plus $1$ time-aligned text stream $W_s$ for Moshi's Inner Monologue):
$$V_{s, 1} = W_s \;\text{(Moshi text)}, \quad V_{s, 2} = A_{s, 1} \;\text{(Moshi semantic)}, \quad V_{s, 1+q} = A_{s-\tau, q} \;(1 < q \le 8,\;\text{delayed Moshi acoustic})$$
$$V_{s, 10} = A'{s, 1} \;\text{(User semantic)}, \quad V{s, 9+q} = A'_{s-\tau, q} \;(1 < q \le 8,\;\text{delayed User acoustic})$$
Rather than flattening $K \cdot S = 17 \times 3,750 = 63,750$ tokens into a single Transformer, Moshi uses a two-level RQ-Transformer (arXiv:2410.00037, Section 3.4.1 & Figure 3):
- Temporal Transformer ($\mathrm{Tr}{\mathrm{Temp}}$, 7B parameters, 32 layers, $d = 4096$): Initialized from Helium, it consumes the sum of the $K = 17$ learned token embeddings from the previous step $V{s-1}$ and outputs a temporal context vector $z_s = \mathrm{Tr}{\mathrm{Temp}}(V_0, \dots, V{s-1}) \in \mathbb{R}^{4096}$, immediately predicting the Inner Monologue text logits $l_{s,1} = \mathrm{Lin}(z_s) \in \mathbb{R}^{32,000}$.
- Depth Transformer ($\mathrm{Tr}{\mathrm{Depth}}$, 6 layers, $d = 1024$, MLP $4096$, 16 heads): Conditioned on $z_s$ and the sampled text token $V{s,1}$, the small Depth Transformer autoregressively predicts the remaining sub-sequences $l_{s,k} = \mathrm{Tr}{\mathrm{Depth}}(z_s, V{s,1}, \dots, V_{s,k-1})$ along the depth axis $k \in \{2, \dots, 17\}$ using depthwise per-codebook linear projection and FFN weights (
arXiv:2410.00037, Section 3.4.1). At live inference, Moshi samples its own text token ($k=1$) and audio tokens ($k \in \{2, \dots, 9\}$), while replacing user stream predictions ($k > 9$) with the live encoded Mimi tokens from the user's microphone. When the user speaks and Moshi listens, Moshi's text stream outputsPADtokens (which account for ~65% of English conversational tokens) alongsideEPADword-start markers, and its audio tokens decode into "natural silence"—eliminating hard turn boundaries while allowing instant speech trigger by forcing anEPADtoken (arXiv:2410.00037, Section 3.4.4). - Why Acoustic Delay ($\tau \in \{1, 2\}$), Semantic Weighting ($\alpha_k = 100$), and Inner Monologue Are Essential (Tables 5–8): - RQ-Transformer vs. Parallel Heads (Table 5): A staircase delay
[0,1,2,3,4,5,6,7](as in MusicGen) allows parallel heads (42.2 PPL vs. 40.3 PPL with RQ-Transformer) but incurs an unacceptable 8-step = 640 ms latency. Collapsing the delay to[0,2,2,2,2,2,2,2](240 ms in pre-training, lowered to $\tau = 1 \implies \mathbf{160\text{ ms}}$ theoretical latency in post-training/fine-tuning) causes parallel heads to collapse to 135.4 perplexity, whereas the RQ-Transformer achieves 36.8 perplexity. - Inner Monologue & Loss Weighting Ablations (Table 6): In the multi-token cross-entropy loss $L(V, l) = \frac{1}{S}\sum_{s=1}^S (\mathrm{CE}(l_{s,1}, V_{s,1}) + \frac{1}{\sum_{k=2}^K \alpha_k}\sum_{k=2}^K \alpha_k \mathrm{CE}(l_{s,k}, V_{s,k}))$ (arXiv:2410.00037, Equation 7), increasing the semantic token weight $\alpha_k$ from 1.0 to 100.0, adding depthwise Depth Transformer weights, and enabling Inner Monologue drops Whisper-transcribed LiteLlama-460M negative log-likelihood from 4.36 ([0..0]delay, 486 chars) $\to$ 4.09 ([0,2..2]delay, 519 chars) $\to$ 3.75 ($\alpha_k = 100$, 538 chars) $\to$ 3.65 (depthwise, 602 chars) $\to$ 2.77 (Inner Monologue, 1,920 chars). - Zero-Shot Streaming TTS (4.7% WER) and Streaming ASR (5.7% WER) via Text-Audio Delay (Section 5.7): Simply shifting the Inner Monologue delay so text precedes audio by +2 seconds turns Moshi into a zero-shot streaming multi-speaker TTS achieving 4.7% WER on LibriSpeechtest-clean(beating VALL-E's 5.9% WER with only 2s lookahead). Shifting audio ahead of text by +2 seconds turns Moshi into a streaming ASR achieving 5.7% WER with 80 ms word-alignment precision.
End-to-End PyTorch Reference Implementation: Split-RVQ Audio Tokenizer, Multi-Stream Acoustic Delay Scheduler, and RQ-Transformer with Inner Monologue
Below is a clean, self-contained PyTorch implementation demonstrating the three mathematical cores of modern real-time speech-text foundation models (arXiv:2210.13438, arXiv:2410.00037):
- Split Residual Vector Quantizer (
SplitRVQ) with parallel semantic VQ (plus linear head for WavLM cosine distillation) and multi-stage acoustic RVQ with straight-through gradients and 50% sequence-level quantization dropout. - Multi-Stream Joint Sequence Scheduler implementing Equation 6 of
arXiv:2410.00037($K = 2Q + 1 = 17$ streams at 12.5 Hz withPAD/EPADInner Monologue text prefixing and acoustic delay $\tau \in \{1, 2\}$). - Depthwise-Parameterized
RQTransformerStepcombining a Temporal Transformer context vector $z_s$ with a per-codebook Depth Transformer and $\alpha_{\text{sem}} = 100$ weighted cross-entropy loss (Equation 7 ofarXiv:2410.00037).
from __future__ import annotations
import torch
import torch.nn as nn
import torch.nn.functional as F
class VectorQuantizerLayer(nn.Module):
"""Single Vector Quantization codebook with Straight-Through Estimator (STE)."""
def __init__(self, num_entries: int = 2048, dim: int = 256) -> None:
super().__init__()
self.num_entries = num_entries
self.dim = dim
self.codebook = nn.Embedding(num_entries, dim)
nn.init.uniform_(self.codebook.weight, -1.0 / num_entries, 1.0 / num_entries)
def forward(self, z: torch.Tensor) -> tuple[torch.Tensor, torch.Tensor, torch.Tensor]:
# z: [B, S, D] where S is 12.5 Hz frame sequence length
flat_z = z.reshape(-1, self.dim)
dists = (
flat_z.pow(2).sum(dim=-1, keepdim=True)
- 2.0 * (flat_z @ self.codebook.weight.t())
+ self.codebook.weight.pow(2).sum(dim=-1).unsqueeze(0)
)
indices = torch.argmin(dists, dim=-1).reshape(z.shape[0], z.shape[1])
z_q = self.codebook(indices)
commitment_loss = F.mse_loss(z, z_q.detach())
# Straight-Through Estimator: forward value is z_q, backward gradient flows to z
z_q_ste = z + (z_q - z).detach()
return z_q_ste, indices, commitment_loss
class MimiSplitRVQ(nn.Module):
"""Mimi Split-RVQ (arXiv:2410.00037 Sec 3.3.2):
1 Semantic VQ (distilling WavLM 1024-d) + (Q-1)=7 Acoustic RVQ stages in parallel.
"""
def __init__(
self,
latent_dim: int = 512,
vq_dim: int = 256,
wavlm_dim: int = 1024,
num_quantizers: int = 8,
codebook_size: int = 2048,
quantize_prob: float = 0.5,
) -> None:
super().__init__()
self.num_quantizers = num_quantizers
self.quantize_prob = quantize_prob
self.in_proj = nn.Linear(latent_dim, vq_dim)
self.out_proj = nn.Linear(vq_dim, latent_dim)
self.semantic_vq = VectorQuantizerLayer(codebook_size, vq_dim)
self.wavlm_proj = nn.Linear(vq_dim, wavlm_dim)
self.acoustic_rvq = nn.ModuleList(
[VectorQuantizerLayer(codebook_size, vq_dim) for _ in range(num_quantizers - 1)]
)
def forward(
self, z: torch.Tensor, wavlm_targets: torch.Tensor | None = None
) -> tuple[torch.Tensor, torch.Tensor, torch.Tensor]:
# z: [B, S, 512] at 12.5 Hz (80 ms per frame)
z_low = self.in_proj(z)
z_sem, idx_sem, loss_sem = self.semantic_vq(z_low)
all_indices = [idx_sem]
total_loss = loss_sem
if wavlm_targets is not None:
# Cosine distance distillation to 12.5 Hz non-causally pooled WavLM embeddings
sem_pred = self.wavlm_proj(z_sem)
cos_dist = 1.0 - F.cosine_similarity(sem_pred, wavlm_targets, dim=-1).mean()
total_loss = total_loss + cos_dist
# Parallel 7-level Acoustic RVQ operating on z_low (not the semantic residual!)
residual = z_low
z_ac_sum = torch.zeros_like(z_low)
for vq_layer in self.acoustic_rvq:
z_q, idx_q, loss_q = vq_layer(residual)
residual = residual - z_q
z_ac_sum = z_ac_sum + z_q
all_indices.append(idx_q)
total_loss = total_loss + loss_q
z_quantized = z_sem + z_ac_sum
# 50% sequence-level quantization rate during training (arXiv:2410.00037 Sec 3.3.1)
if self.training and self.quantize_prob < 1.0:
mask = (
torch.rand(z.shape[0], 1, 1, device=z.device) < self.quantize_prob
).float()
z_quantized = mask * z_quantized + (1.0 - mask) * z_low
tokens = torch.stack(all_indices, dim=-1) # [B, S, Q=8]
return self.out_proj(z_quantized), tokens, total_loss
def build_moshi_joint_streams(
text_tokens: torch.Tensor,
moshi_audio: torch.Tensor,
user_audio: torch.Tensor,
acoustic_delay: int = 1,
) -> torch.Tensor:
"""Constructs the K = 2Q + 1 = 17 joint stream tensor V_{s, k} (arXiv:2410.00037 Eq. 6).
text_tokens: [B, S]
moshi_audio: [B, S, Q=8]
user_audio: [B, S, Q=8]
Returns V: [B, S, 17]
"""
bsz, seq_len, num_q = moshi_audio.shape
v_streams = torch.zeros(
bsz, seq_len, 2 * num_q + 1, dtype=torch.long, device=moshi_audio.device
)
# k=0 (1-indexed k=1): Inner Monologue aligned text tokens W_s
v_streams[:, :, 0] = text_tokens
# k=1 (1-indexed k=2): Moshi semantic token A_{s, 1} (no delay)
v_streams[:, :, 1] = moshi_audio[:, :, 0]
# k=9 (1-indexed k=1+Q+1=10): User semantic token A'_{s, 1} (no delay)
v_streams[:, :, 1 + num_q] = user_audio[:, :, 0]
if seq_len > acoustic_delay:
# Delayed acoustic tokens A_{s - tau, 2..Q} for Moshi and User
v_streams[:, acoustic_delay:, 2 : 1 + num_q] = moshi_audio[
:, : seq_len - acoustic_delay, 1:
]
v_streams[:, acoustic_delay:, 2 + num_q :] = user_audio[
:, : seq_len - acoustic_delay, 1:
]
return v_streams
class DepthwiseRQTransformerLoss(nn.Module):
"""Per-codebook Depth Transformer projection + Moshi weighted loss (arXiv:2410.00037 Eq. 7)."""
def __init__(
self,
num_q: int = 8,
text_vocab: int = 32000,
audio_vocab: int = 2048,
temp_dim: int = 1024,
depth_dim: int = 512,
) -> None:
super().__init__()
self.num_q = num_q
self.k_total = 2 * num_q + 1 # 17 streams
self.text_head = nn.Linear(temp_dim, text_vocab)
self.temp_to_depth = nn.Linear(temp_dim, depth_dim)
# Per-index k depthwise linear heads for k in {2..17} (16 audio streams)
self.depth_heads = nn.ModuleList(
[nn.Linear(depth_dim, audio_vocab) for _ in range(2 * num_q)]
)
def compute_loss(
self, z_temporal: torch.Tensor, h_depth: torch.Tensor, targets_v: torch.Tensor
) -> torch.Tensor:
# z_temporal: [B, S, temp_dim], h_depth: [B, S, 16, depth_dim], targets_v: [B, S, 17]
logits_text = self.text_head(z_temporal)
ce_text = F.cross_entropy(
logits_text.reshape(-1, logits_text.size(-1)), targets_v[:, :, 0].reshape(-1)
)
# Equation 7: alpha_k = 100.0 for semantic tokens (k=2 and k=10), 1.0 for acoustic tokens
weights: list[float] = []
audio_losses: list[torch.Tensor] = []
for idx in range(2 * self.num_q):
is_semantic = idx in (0, self.num_q)
alpha_k = 100.0 if is_semantic else 1.0
logits_k = self.depth_heads[idx](h_depth[:, :, idx, :])
ce_k = F.cross_entropy(
logits_k.reshape(-1, logits_k.size(-1)),
targets_v[:, :, idx + 1].reshape(-1),
)
weights.append(alpha_k)
audio_losses.append(alpha_k * ce_k)
weighted_audio_ce = torch.stack(audio_losses).sum() / sum(weights)
return ce_text + weighted_audio_ceComprehensive Speech-Text & Spoken Dialogue Benchmarks: Spoken QA, Full-Duplex Turn-Taking, and Model Quantization (arXiv:2410.00037)
To understand how Moshi performs across linguistic reasoning, zero-shot spoken question answering, full-duplex conversational dynamics, and post-training quantization (W8A8 / W4A8), let us examine the empirical benchmarks reported in Section 5 (Tables 7, 8, 9, 10, and 11) of arXiv:2410.00037:
1. Audio Language Modeling (sWUGGY, sBLIMP, sStoryCloze, MMLU) and 0-Shot Spoken Question Answering
In Table 7 of arXiv:2410.00037, Kyutai evaluates Moshi across three training regimes against GSLM, AudioLM, TWIST, VoxtLM, and Spirit-LM:
- Audio-Only Cold Start (Random Init, No Text): Moshi reaches 74.8% sWUGGY, 59.9% sBLIMP, 80.9% sTopic-StoryCloze, and 56.9% sStoryCloze, beating GSLM (64.8% / 54.2% / 66.6% / 53.3%) and TWIST (72.2% / 56.5%) on lexical and story coherence while AudioLM leads syntactic sBLIMP (64.7% vs. 59.9%).
- Audio-Only Warm Start (Initialized from Helium 7B): Moshi achieves 74.3% sWUGGY, 58.9% sBLIMP, 81.8% sTopic-StoryCloze, and 58.7% sStoryCloze, outperforming Spirit-LM (69.5% / 58.0% / 72.9% / 54.8%), VoxtLM (62.9% / 53.9%), and TWIST (74.5% / 59.2% / 76.4% / 55.4%) on semantic story understanding.
- Joint Text + Audio Warm Start: After single-stream pre-training on 7 million hours of Whisper-large-v3-transcribed English audio (retaining 50% text-only batches), Moshi achieves 72.6% sWUGGY, 58.8% sBLIMP, 83.0% sTopic-StoryCloze, 60.8% sStoryCloze, and 49.8% 5-shot MMLU—scoring +12.9 MMLU points higher than Spirit-LM (36.9% MMLU). After multi-stream post-training (100k steps on PyAnnote-diarized audio), 2,000-hour Fisher duplex fine-tuning (10k steps, upsampled from 8 kHz to 24 kHz via AudioSR), and synthetic instruction tuning (30k steps with $-24\text{ to }+15\text{ dB}$ gain, DNS noise, $100\text{–}500\text{ ms}$ echo, and reverb augmentations), Moshi reaches 83.6% sTopic-StoryCloze, 62.7% sStoryCloze, and 49.7% MMLU (48.7% MMLU with a synthetic voice).
- Spoken Question Answering (
arXiv:2410.00037, Table 8): On 0-shot Spoken Web Questions, LlaMA-Questions, and Audio TriviaQA, enabling Inner Monologue nearly triples Moshi's accuracy from 9.2% $\to$ 26.6% (Web Questions), 21.0% $\to$ 62.3% (LlaMA-Questions), and 7.3% $\to$ 22.8% (Audio TriviaQA)—outperforming non-streaming Chain-of-Modality models SpeechGPT 7B (6.5%, 21.6%, 14.8%) and Spectron 1B (6.1%, 22.9%) by nearly $3\times$ to $4\times$! Dropping the 50% text-only batches during pre-training lowers Moshi's accuracy to 23.2%, 61.3%, and 18.3%, proving that mixing text batches during audio pre-training is essential to prevent catastrophic forgetting of the Helium text topline (32.3%, 75.0%, 56.4%).
| Spoken / Multimodal Model (`arXiv:2410.00037` Tables 7–9) | sWUGGY / sBLIMP (%) | sTopic / sStoryCloze (%) | 5-Shot Text MMLU (%) | 0-Shot Spoken QA (WebQ / LlaMA-Q / TriviaQA) | Streaming & Full-Duplex Overlap |
|---|---|---|---|---|---|
| GSLM / AudioLM (Audio-Only Cold Start) | 64.8 / 54.2 & 71.5 / 64.7 | 66.6 / 53.3 & — | ∅ | GSLM: 1.5 / 4.0 / — | AudioLM: 2.3 / 7.0 / — | Single-turn offline |
| TWIST (7B) / VoxtLM / Spirit-LM (7B) | 74.5/59.2 | 66.1/57.1 | 69.0/58.3 | 76.4/55.4 | — | 82.9/61.0 | ∅ | ∅ | 36.9% | TWIST 7B: 1.1% / 0.5% / — | Semantic tokens only (external vocoder) |
| SpeechGPT (7B) / Spectron (1B) | — | — | — | 6.5% / 21.6% / 14.8% & 6.1% / 22.9% / — | Non-streaming Chain-of-Modality |
| Moshi (w/o Inner Monologue, Audio-Only) | 74.8 / 59.9 (Cold) | 74.3 / 58.9 (Warm) | 81.8 / 58.7 (Warm) | ∅ | 9.2% / 21.0% / 7.3% | Transcript NLL: 3.65 (602 chars) |
| Moshi (Full Multi-Stream + Inner Monologue) | 72.6 / 58.8 (1-stream) | 63.0 / 55.2 (Instruct) | 83.6 / 62.7 (Instruct) | 49.8% / 49.7% | 26.6% / 62.3% / 22.8% (w/o text batches: 23.2/61.3/18.3) | 160ms/200ms Full-Duplex | NLL 2.77 (1920 chars) |
| Helium 7B (Text-Only Topline) | — (Text Only) | — (Text Only) | 54.3% | 32.3% / 75.0% / 56.4% | W4A8 block-32 (4.37 GB): 52.97% MMLU |
2. Full-Duplex Conversational Turn-Taking (IPU, Pause, Gap, Overlap) and Model Quantization (W8A8 / W4A8)
Because Moshi models both the system stream and the user stream in parallel, it can simulate full two-party dialogues from 1,000 10-second Fisher prompts (arXiv:2410.00037, Table 9):
- Natural Turn-Taking & Overlapping Speech Dynamics (Table 9): Compared against dGSLM (
Best non-cascaded, Nguyen et al., 2023: 195.9 DialoGPT conditional perplexity, 41.4s Inter-Pausal Units [IPU], 13.8s Pause, 10.7s Gap, 6.1s Overlap) and a Cascaded ASR+LM+TTS topline (45.9 PPL, 54.8s IPU, 0.0s Pause, 5.3s Gap, 0.0s Overlap—incapable of modeling pauses or overlapping speech), Moshi at temperature $0.8 / 0.9 / 1.0$ achieves 41.9 / 56.7 / 79.3 DialoGPT perplexity and at temperature $1.0$ reproduces human conversational statistics almost exactly: 50.8s IPU, 7.0s Pause, 4.5s Gap, and 4.1s Overlap (matching the 1,000-sample Fisher Human Ground Truth: 59.6 PPL, 51.1s IPU, 6.4s Pause, 4.2s Gap, and 3.3s Overlap). - Post-Training Quantization Sensitivity (
arXiv:2410.00037, Section 5.8, Tables 10–11): Using dynamic 8-bit symmetric AbsMax activation quantization (A8) and asymmetric MinMax weight quantization (WX) with block size 32: - Helium 7B Text Backbone (Table 10, BF16A8 ~15 GB = 54.3% MMLU): Compresses cleanly down to 4 bits:
W8A8(7.66 GB, 53.81% MMLU),W6A8(6.02 GB, 53.86% MMLU),W5A8(5.20 GB, 52.76% MMLU),W4A8(4.37 GB — 3.43x smaller — 52.97% MMLU, vs. 50.84% at block-256 and 49.29% per-channel), andW3A8(3.55 GB, 50.85% MMLU at block-32 vs. 25.49% per-channel), collapsing only atW2A8(2.73 GB, 24.27% MMLU). - Moshi Multimodal Model (Table 11, BF16A8 15.24 GB = 49.8% MMLU): At block size 32,
W8A8(8.33 GB) preserves 48.5% MMLU (48.8% at block-256),W6A8(6.95 GB) preserves 49.1% MMLU, andW5A8(6.02 GB) preserves 48.5% MMLU, whereas aggressive 4-bit quantization degrades MMLU by 5–10 points and introduces acoustic artifacts—explaining why production Moshi deployments useW8A8(~8.33 GB, ~2x compression) while leaving the initial embedding tables, RMSNorms, and the Mimi codec unquantized.
Frequently Asked Questions (FAQ)
1. Why do unconditioned language models trained purely on acoustic codec tokens (such as SoundStream or EnCodec) produce babbling speech, while semantic token models lose speaker identity? As Zalán Borsos et al. demonstrated in AudioLM (arXiv:2209.03143, Table I & Tables II–III), discrete audio representations face a fundamental trade-off between phonetic discriminability (triphone ABX error) and waveform reconstruction quality (ViSQOL). Self-supervised masked language model tokens extracted from layer 7 of w2v-BERT XL ($K=1024$ at 25 Hz / 250 bps) achieve an ABX error rate of just 6.7% within-speaker and 7.6% across-speaker, capturing invariant phonetic and lexical structure, but strip away speaker identity (3.2% speaker classification accuracy across 291 speakers, 1.1 ViSQOL). Conversely, SoundStream 12-layer RVQ acoustic tokens (50 Hz, 6,000 bps) reconstruct the waveform and speaker timbre with 3.9 ViSQOL and 100.0% speaker classification accuracy, but have poor phonetic invariance (17.8% within / 26.6% across-speaker ABX error). Combining semantic tokens first and conditioning acoustic tokens on them—either across stages (AudioLM) or within a single frame via Split-RVQ and Inner Monologue (Mimi / Moshi)—achieves both linguistic coherence and vocal fidelity.
2. How does Mimi (arXiv:2410.00037) achieve a higher human MUSHRA score (81.0) at 1.1 kbps and 12.5 Hz than neural codecs operating at 4x to 6x higher frame rates? Mimi combines three structural innovations (arXiv:2410.00037, Section 3.3, Tables 3–4): first, it inserts 8-layer causal RoPE Transformers ($d=512$, 20s context, LayerScale $0.01$) inside the bottleneck before and after quantization so the encoder and decoder can leverage a 250-frame receptive field across the $1,920\times$ downsampled 12.5 Hz (80 ms) frames. Second, it introduces a Split RVQ that separates the WavLM-distilled 1-level Semantic VQ from a parallel 7-level Acoustic RVQ (summing their outputs), preventing the semantic cosine distillation loss from corrupting the residual of the acoustic codebooks (lifting MUSHRA from 57.8 to 64.0). Third, Mimi is trained with adversarial-only losses (MS-STFT discriminator hinge and feature-matching losses without spectral $L_1/L_2$ reconstruction losses), which boosts human MUSHRA from 58.8 to 81.0 at 1.1 kbps—outperforming SpeechTokenizer at 4.0 kbps (74.3 MUSHRA) and SemantiCodec at 1.3 kbps (64.8 MUSHRA).
3. Why does VALL-E (arXiv:2301.02111) use an Autoregressive (AR) model for the first EnCodec RVQ codebook and a Non-Autoregressive (NAR) model for codebooks 2 through 8? In a 24 kHz EnCodec representation at 6.0 kbps (75 frames/second, $Q = 8$ RVQ codebooks), 10 seconds of audio corresponds to a $750 \times 8$ matrix (6,000 tokens). Because speaking rate and rhythm vary significantly across unseen speakers, predicting the first quantizer $\mathbf{c}{:,1}$ with an Autoregressive (AR) Transformer via sampling decoding allows VALL-E to dynamically determine the utterance duration $T$ and prosodic contour conditioned on a 3-second enrollment prefix $\tilde{\mathbf{c}}{:,1}$ (arXiv:2301.02111, Section 4.2). Once $T$ is fixed by codebook 1, the remaining 7 residual codebooks ($j \in [2, 8]$) only refine local acoustic details; predicting each layer in parallel with a bidirectional Non-Autoregressive (NAR) Transformer conditioned via AdaLN(h, i) = a_i LayerNorm(h) + b_i reduces residual generation complexity from $\mathcal{O}(7T)$ to $7$ parallel $\mathcal{O}(1)$ steps while achieving 5.9% WER (3.8% continual) and 4.38 SMOS on LibriSpeech.
4. How does Moshi's Inner Monologue differ from the Chain-of-Modality used in SpeechGPT and Spectron, and why does it enable streaming ASR and TTS? In Chain-of-Modality (SpeechGPT, Spectron), the model must generate the entire text response token-by-token before generating the first audio token, incurring multi-second latency that prevents live conversation (arXiv:2410.00037, Section 2 & 3.4.4). In contrast, Moshi's Inner Monologue aligns text tokens directly to the 12.5 Hz (80 ms) audio frame grid using PAD (silence/continuation, ~65% of tokens) and EPAD (end-of-padding / word-onset) tokens. At every 80 ms step $s$, the Temporal Transformer predicts one text token $W_s = V_{s,1}$ as an immediate prefix to the Depth Transformer's prediction of that exact frame's semantic token $A_{s,1} = V_{s,2}$ and delayed acoustic tokens $A_{s-\tau, 2..8}$. This per-frame text scaffolding nearly triples 0-shot LlaMA-Questions accuracy from 21.0% to 62.3% while maintaining 160 ms theoretical (200 ms practical) streaming latency. Moreover, shifting the text-to-audio delay to +2 seconds turns Moshi into a zero-shot streaming TTS (4.7% WER on LibriSpeech test-clean), whereas shifting audio ahead of text by +2 seconds turns it into a streaming ASR (5.7% WER with 80 ms word timestamps).
5. Why did zero-shot Whisper (arXiv:2212.04356) cut out-of-distribution Word Error Rate by 55.2% compared to supervised models with identical LibriSpeech test-clean accuracy? Models trained or fine-tuned exclusively on a single narrow distribution such as LibriSpeech (960 hours of clean read audiobooks) learn brittle, dataset-specific acoustic and formatting shortcuts (arXiv:2212.04356, Section 1 & 3.3). When wav2vec 2.0 Large (no LM) and Zero-Shot Whisper Large V2 (1,550M parameters) are compared in Table 2 of arXiv:2212.04356, both achieve an identical 2.7% WER on in-distribution LibriSpeech test-clean. However, because Whisper was trained weakly supervised across 680,000 hours of diverse, multi-domain, noisy, and multilingual web audio without dataset-specific fine-tuning, its average WER across 14 diverse speech recognition benchmarks drops from 29.3% (wav2vec 2.0 Large) to 12.8% (Whisper Large V2)—a 55.2% average Relative Error Reduction—including reductions from 24.5% to 6.2% on Artie (74.7% RER), 29.9% to 9.0% on Common Voice (69.9% RER), and 65.8% to 25.5% on far-field CHiME6 (61.2% RER).
Primary Technical Sources & Official References
- OpenAI — Whisper (
arXiv:2212.04356Full HTML Specification): Alec Radford, Jong Wook Kim, Tao Xu, Greg Brockman, Christine McLeavey, and Ilya Sutskever, "Robust Speech Recognition via Large-Scale Weak Supervision," ICML / arXiv:2212.04356v1 — https://arxiv.org/html/2212.04356v1 - OpenAI — Whisper (
arXiv:2212.04356Abstract & Citation Record): "Robust Speech Recognition via Large-Scale Weak Supervision," arXiv:2212.04356 — https://arxiv.org/abs/2212.04356 - Meta AI (FAIR) — EnCodec (
arXiv:2210.13438Full HTML Specification): Alexandre Défossez, Jade Copet, Gabriel Synnaeve, and Yossi Adi, "High Fidelity Neural Audio Compression," TMLR / arXiv:2210.13438v1 — https://arxiv.org/html/2210.13438v1 - Meta AI (FAIR) — EnCodec (
arXiv:2210.13438Abstract & Citation Record): "High Fidelity Neural Audio Compression," arXiv:2210.13438 — https://arxiv.org/abs/2210.13438 - Google Research — AudioLM (
arXiv:2209.03143Full HTML Specification): Zalán Borsos, Raphaël Marinier, Damien Vincent, Eugene Kharitonov, Olivier Pietquin, Matt Sharifi, Dominik Roblek, Olivier Teboul, David Grangier, Marco Tagliasacchi, and Neil Zeghidour, "AudioLM: a Language Modeling Approach to Audio Generation," IEEE/ACM TASLP / arXiv:2209.03143v1 — https://arxiv.org/html/2209.03143v1 - Google Research — AudioLM (
arXiv:2209.03143Abstract & Citation Record): "AudioLM: a Language Modeling Approach to Audio Generation," arXiv:2209.03143 — https://arxiv.org/abs/2209.03143 - Microsoft Research — VALL-E (
arXiv:2301.02111Full HTML Specification): Chengyi Wang, Sanyuan Chen, Yu Wu, Ziqiang Zhang, Long Zhou, Shujie Liu, Zhuo Chen, Yanqing Liu, Huaming Wang, Jinyu Li, Lei He, Sheng Zhao, and Furu Wei, "Neural Codec Language Models are Zero-Shot Text to Speech Synthesizers," arXiv:2301.02111v1 — https://arxiv.org/html/2301.02111v1 - Microsoft Research — VALL-E (
arXiv:2301.02111Abstract & Citation Record): "Neural Codec Language Models are Zero-Shot Text to Speech Synthesizers," arXiv:2301.02111 — https://arxiv.org/abs/2301.02111 - Kyutai — Moshi, Helium & Mimi (
arXiv:2410.00037Full HTML Specification): Alexandre Défossez, Laurent Mazaré, Manu Orsini, Amélie Royer, Patrick Pérez, Hervé Jégou, Edouard Grave, and Neil Zeghidour, "Moshi: a speech-text foundation model for real-time dialogue," arXiv:2410.00037v2 — https://arxiv.org/html/2410.00037v2 - Kyutai — Moshi, Helium & Mimi (
arXiv:2410.00037Abstract & Citation Record): "Moshi: a speech-text foundation model for real-time dialogue," arXiv:2410.00037 — https://arxiv.org/abs/2410.00037