Speech-to-speech modelling
Speech understanding
Speech input for LLMs
Three ways to feed speech to an LLM: continuous encoder embeddings, discrete semantic tokens, or codec tokens. Most models use the first.
| Option | What it is | Used by |
|---|---|---|
| Continuous embeddings | ASR-pretrained encoder, then a small projector into LLM space | Voxtral (arXiv 2507.13264), Qwen3-Omni (arXiv 2509.17765), Granite-speech (arXiv 2505.08699), Phi-4-multimodal (arXiv 2503.01743), Step-Audio 2 (arXiv 2507.16632), Canary-Qwen |
| Discrete semantic tokens | Single-codebook VQ on an ASR encoder, built for AR generation | GLM-4-Voice (12.5 Hz, 175 bps; arXiv 2412.02612) |
| Codec tokens | Multi-codebook RVQ, first layer distilled toward a semantic teacher | Moshi's Mimi (12.5 Hz, 8 codebooks, WavLM-distilled first layer; arXiv 2410.00037) |
| Hybrid | Discrete and continuous summed | Kimi-Audio (12.5 Hz semantic tokens from a VQ layer in the Whisper encoder, plus continuous Whisper features downsampled to 12.5 Hz; arXiv 2504.18425) |
Per-model paths
| Model | Encoder and adapter | Rate to LLM |
|---|---|---|
| Voxtral (arXiv 2507.13264) | Whisper large-v3 encoder, 30 s chunks, MLP adapter with 4x downsample | 12.5 Hz |
| Qwen3-ASR (arXiv 2601.21337) / Qwen3-Omni (arXiv 2509.17765) | AuT encoder, 8x conv downsample, 1-8 s dynamic attention window | 12.5 Hz |
| Granite-speech (arXiv 2505.08699) | CTC-trained Conformer plus windowed Q-Former; 100 Hz log-mel reduced 2x at the encoder input, then 5x in the Q-Former | 10 Hz |
| Step-Audio 2 (arXiv 2507.16632) | Frozen encoder at 25 Hz, adaptor with 2x downsampling | 12.5 Hz |
| Qwen2-Audio (arXiv 2407.10759) | Encoder initialised from Whisper-large-v3, plus a stride-2 pooling layer | 25 Hz (40 ms per frame) |
Why 12.5 Hz converges
Whisper emits 50 Hz frames. Voxtral notes that 30 minutes of audio at 50 Hz is a sequence of 90k tokens, which is why it adds a 4x downsampling adapter (arXiv 2507.13264). Moshi's Mimi codec also runs at 12.5 Hz (arXiv 2410.00037).
Trade-offs
- Continuous: richest acoustic and paralinguistic signal, easy to train as ASR, but the output side needs a separate path.
- Discrete: one vocabulary for input and output, enables self-supervised next-token training, loses detail.
- Codec: the model hears and speaks the same tokens, but multi-codebook streams cost more per frame. Inference This suits duplex.
- Inference Downsampling to 10-12.5 Hz is the main sequence-length lever. It costs fine acoustic detail, which motivates hybrids like Kimi-Audio.
"Input is converging on an ASR-pretrained encoder, a small projector and about 12.5 Hz. Discrete tokens appear when the same vocabulary must also be generated."
ASR with speech LLMs: offline and streaming
ASR is one more speech-to-text task on the encoder, projector and LLM stack. The design questions are how much to train, and how to stream.
Training recipes
| Model | Recipe |
|---|---|
| Canary-Qwen (NVIDIA) | LLM frozen; train encoder, projection and LoRA. Trained on about 234K h of public speech; the card reports 5.63 mean WER and RTFx 418 on the Open ASR Leaderboard (NVIDIA model card) |
| Granite-speech (arXiv 2505.08699) | Encoder, projector and LoRA (rank 64 on q, v) trained jointly |
| Phi-4-multimodal (arXiv 2503.01743) | Two stages: ASR pre-training updates encoder and projector with the language decoder frozen; post-training freezes the encoder and updates projector and speech LoRA |
| Voxtral (arXiv 2507.13264) | Pretraining, then SFT, then DPO and online DPO |
- Freezing the LLM is the direct guard against forgetting. Granite-speech states that in text mode it calls the underlying LLM without LoRA, which preserves its text capabilities.
- Canary-Qwen's LLM mode takes a text transcript only, not raw audio (NVIDIA model card).
Streaming approaches
| Approach | Mechanism |
|---|---|
| Chunked or causal encoder | Qwen3-ASR's AuT encoder uses a 1-8 s dynamic attention window, so one model serves streaming (short chunks) and offline inference; the authors report an average TTFT as low as 92 ms for the 0.6B model (arXiv 2601.21337) |
| Delayed streams | Kyutai DSM: a decoder-only LM over time-aligned streams. ASR corresponds to delaying the text stream relative to the audio, and the reverse gives TTS (arXiv 2509.08753) |
| Chunked decoder | SpeechLLM-XL: decoder-only model over configurable audio chunks; the authors report 2.7 / 6.7 WER on LibriSpeech test clean / other with 1.28 s chunks. CTC forced alignment segments the training transcripts (arXiv 2410.03752) |
Inference Chunk size and lookahead trade latency against WER.
Multilingual scale
Omnilingual ASR (Meta) covers over 1,600 languages, in models from 300M to 7B parameters (arXiv 2511.09690). Qwen3-ASR covers 52 languages and dialects (arXiv 2601.21337).
Leaderboard state
The Open ASR Leaderboard compares 86 systems on 12 datasets, with English short- and long-form and multilingual tracks (arXiv 2510.06961). Its authors observe that Conformer encoders paired with Transformer decoders reach the best average WER, while CTC and TDT decoders give the best RTFx.
Open question and scope
- Not covered here: transducer plus LLM hybrids and CTC-prefix joint decoding.
"From my streaming ASR work: chunk size and lookahead set the latency/WER trade-off. The new twist is delayed text streams, so ASR becomes a special case of a multistream LM."
Whisper and the Whisper encoder
Whisper is an encoder-decoder Transformer trained on 680,000 hours of weakly supervised audio. Its encoder became the default front end for speech LLMs. Source: arXiv 2212.04356 unless stated.
Architecture
- Confirmed Input is 16 kHz audio turned into an 80-channel log-magnitude mel spectrogram (25 ms window, 10 ms stride), in 30 s segments.
- Confirmed The stem is two conv layers (width 3, GELU); the second has stride 2, so one encoder frame covers 20 ms.
- Derived: the 10 ms hop gives 100 mel frames per second (100 Hz). The stride-2 conv halves that to one frame per 20 ms (50 Hz). A 30 s window is therefore 30 s / 10 ms = 3,000 mel frames and 3,000 / 2 = 1,500 encoder frames. Short audio is padded to 30 s, so compute is paid for the full window.
Rule (derived arithmetic):
| Rate | ms per frame | Where it comes from |
|---|---|---|
| 100 Hz | 10 | Log-mel hop (arXiv 2212.04356) |
| 50 Hz | 20 | Whisper encoder after the stride-2 conv (arXiv 2212.04356) |
| 25 Hz | 40 | Qwen2-Audio: stride-2 pooling on the encoder output, each frame about 40 ms (arXiv 2407.10759) |
| 12.5 Hz | 80 | Voxtral: 4x downsampling adapter on 50 Hz embeddings (arXiv 2507.13264) |
| Model | Layers | Width | Heads | Params |
|---|---|---|---|---|
| Tiny | 4 | 384 | 6 | 39M |
| Base | 6 | 512 | 8 | 74M |
| Small | 12 | 768 | 12 | 244M |
| Medium | 24 | 1024 | 16 | 769M |
| Large | 32 | 1280 | 20 | 1550M |
- large-v3: same architecture, 128 mel bins instead of 80, and a Cantonese token. Reported OpenAI reports a 10% to 20% error reduction over large-v2 (OpenAI model card).
- large-v3-turbo: a fine-tuned, pruned large-v3 with the decoder cut from 32 to 4 layers (OpenAI model card). The card lists it at 809M parameters.
Multitask token format
The decoder prompt carries the task as tokens: start-of-transcript, language, task (transcribe or translate), then timestamps or no-timestamps. One model therefore does ASR, X-to-English translation and language ID. Timestamps are quantised to 20 ms.
Training data and recipe
| Model | Data |
|---|---|
| v1 / v2 | 680,000 h weakly supervised: 117,000 h of non-English transcription across 96 other languages, 125,000 h of X-to-English translation, the rest English (paper). |
| large-v3 | 1 million hours of weakly labelled audio and 4 million hours of audio pseudo-labelled with large-v2 (OpenAI model card). |
- Filtering: drop machine-generated transcripts (all caps or all lower, no punctuation). Compare audio language ID (VoxLingua107-trained) with CLD2 on the transcript and drop mismatches; English transcripts of other-language audio are kept as translation data.
- Optimiser: AdamW, gradient-norm clipping, linear decay after 2,048 warmup steps, batch 256, FP16 with activation checkpointing, 2 to 3 passes over the data.
- Augmentation: none for the first models. Large-v2 trained 2.5x more epochs with SpecAugment, stochastic depth and BPE dropout.
Long-form decoding
Whisper slides a 30 s window over long audio and decodes with heuristics (paper section 4.5).
- Beam search with beam 5.
- Temperature fallback from 0, in steps of 0.2 up to 1.0, when average log-probability is below -1 or the gzip compression ratio exceeds 2.4.
- Condition on the previous window's text only when temperature is below 0.5.
- No-speech threshold 0.6 to skip silent windows.
Limitations
- The model card warns that predictions may include text that was not spoken (hallucination) and that the sequence-to-sequence architecture is prone to repetitive text. It also states that the models cannot be used for real-time transcription out of the box.
- The fixed 30 s window, non-causal encoder and autoregressive beam decoder make streaming hard.
Hallucination and repetition are documented limitations on the model card. Do not rank checkpoints on hallucination without your own measurement.
The encoder as a speech-LLM front end
| System | How it uses Whisper |
|---|---|
| Qwen2-Audio (arXiv 2407.10759) | Encoder initialised from Whisper-large-v3 |
| Voxtral (arXiv 2507.13264) | Whisper large-v3-based encoder, 128 mels, each 30 s chunk independent, 4x downsampling adapter |
| GLM-4-Voice (arXiv 2412.02612) | Fine-tuned whisper-large-v3 ASR model with a VQ bottleneck gives a 12.5 Hz, 175 bps single-codebook tokenizer; made causal (see below) |
| LLaMA-Omni 2 (arXiv 2505.02625), Kimi-Audio (arXiv 2504.18425) | LLaMA-Omni 2 uses the Whisper-large-v3 encoder; Kimi-Audio takes continuous Whisper features at 50 Hz and downsamples them to 12.5 Hz with an adaptor |
| Moshi (arXiv 2410.00037) | Whisper large-v3 transcribes the training audio to produce the time-aligned text for the inner monologue; it is not the encoder |
| Qwen3-Omni (arXiv 2509.17765) | Replaced it with AuT (see below) |
Inference Three issues recur. Padding to 30 s wastes compute on short turns. 50 Hz is too long a sequence for an LLM, so every system adds an adapter (50 Hz / 4 = 12.5 Hz). Bidirectional attention blocks streaming, so teams either make the encoder causal (GLM-4-Voice) or replace it (AuT).
Making the Whisper encoder stream
Whisper does not stream for three reasons.
- The encoder takes a fixed 30 s window (arXiv 2212.04356), and Voxtral describes it as a fixed receptive field of 30 s (arXiv 2507.13264).
- Streaming wrappers pad every buffer to the full context length, so each partial result pays for 30 s (arXiv 2506.12154).
- Encoder attention is bidirectional, so every frame sees later audio (GLM-4-Voice replaces it with block-causal attention, arXiv 2412.02612). The model card states the models cannot do real-time transcription out of the box.
Four families fix this, with different cost.
- Causal fine-tuning. CarelessWhisper fine-tunes Whisper with LoRA so each encoder frame attends only to its own chunk and earlier chunks, and it caches encoder keys and values instead of re-encoding padded buffers (arXiv 2508.12301). It trains on 960 h of LibriSpeech with chunk sizes of 40 to 300 ms. The U2-style variant puts a CTC head on the Whisper encoder, trains with dynamic chunk masks (0.1 to 1.0 s) on inputs shorter than 30 s, and rescores with the original decoder (arXiv 2506.12154). GLM-4-Voice makes the encoder causal inside its tokenizer: causal convolution before the Transformer and block-causal attention, then pooling and vector quantisation give 12.5 Hz tokens (arXiv 2412.02612).
- Replace the encoder. Qwen3-Omni trains AuT (Audio Transformer) from scratch on 20 million hours of supervised audio, with 8x Conv2D downsampling to 12.5 Hz and block-wise window attention for real-time prefill caching (arXiv 2509.17765). Qwen3-ASR reuses AuT with a dynamic flash-attention window of 1 s to 8 s, so one model serves streaming (short chunks) and offline (long queries) (arXiv 2601.21337).
- Wrap the offline model. whisper_streaming re-runs Whisper on a growing buffer and commits words once consecutive runs agree (LocalAgreement), at 3.3 s latency (arXiv 2307.14743). Simul-Whisper uses the cross-attention alignment to guide decoding on chunks, with a truncation detector for cut words (arXiv 2406.10052). The U2 authors note that wrappers reprocess the same audio and leave a training-inference mismatch (arXiv 2506.12154).
| Approach | Change to Whisper | Retraining? | Latency and compute | Example |
|---|---|---|---|---|
| Buffer wrapper | None; re-decode a growing buffer, commit on agreement | No | 3.3 s latency; re-encodes padded buffers (arXiv 2307.14743, 2506.12154) | whisper_streaming |
| Alignment-guided wrapper | Cross-attention alignment steers decoding; truncation detector | No Whisper fine-tuning | 1.46% average absolute WER degradation at 1 s chunks (arXiv 2406.10052) | Simul-Whisper |
| Causal LoRA fine-tune | Chunked causal mask in the encoder; encoder KV cache | LoRA, 960 h | Large-v2, 300 ms chunks: 0.081 s average latency (greedy) vs 0.426 s for Ufal-Whisper (beam 5); test-clean WER 4.98% vs 7.50% (arXiv 2508.12301) | CarelessWhisper |
| Causal fine-tune with CTC | Dynamic chunk masks, CTC head, decoder rescoring, KV cache | Full fine-tune, about 5,800 h of earnings calls | 17.30% WER at 1 s chunks; about 267 ms per partial transcript on four CPU cores (arXiv 2506.12154) | U2-style Whisper |
| Causal tokenizer | Causal conv, block-causal attention, pooling, VQ | Fine-tune the ASR model | 12.5 Hz, 175 bps (arXiv 2412.02612) | GLM-4-Voice |
| New windowed encoder | Replace the encoder entirely | From scratch, 20M h | 12.5 Hz; window 1 to 8 s (arXiv 2509.17765, 2601.21337) | AuT in Qwen3-Omni, Qwen3-ASR |
"Whisper streams in three ways: wrap it and pay for re-encoding, fine-tune it causal with a chunked mask and an encoder cache, or replace the encoder. Wrappers need no training but cost latency; causal fine-tuning gets sub-second latency; a new windowed encoder like AuT costs a from-scratch run but serves streaming and offline from one model."
Streaming audio encoders beyond Whisper
Most streaming encoders do one of two things: restrict attention to a causal or windowed context, or cache past activations.
| Encoder | Causal or windowed | Frame rate | Streaming mechanism | Used in |
|---|---|---|---|---|
| AuT | Windowed | 12.5 Hz (about 80 ms per frame) | Dynamic flash-attention window of 1 to 8 s; 8x downsampling (arXiv 2509.17765, 2601.21337) | Qwen3-Omni, Qwen3-ASR |
| Qwen2.5-Omni audio encoder | Windowed (2 s blocks) | About 40 ms per frame (25 Hz, derived) | Initialised from Whisper-large-v3; full attention changed to attention in blocks of 2 s to support prefilling (arXiv 2503.20215) | Qwen2.5-Omni |
| Mimi | Causal | 12.5 Hz (80 ms) | All convolutions causal; theoretical latency 160 ms, 200 ms in practice (arXiv 2410.00037) | Moshi; DSM-ASR (arXiv 2509.08753) |
| GLM-4-Voice tokenizer | Causal conv plus block-causal attention | 12.5 Hz | Whisper-based encoder made causal, then pooled and quantised (arXiv 2412.02612) | GLM-4-Voice |
| Cache-aware FastConformer | Limited look-ahead | 80 ms (8x downsampling of a 10 ms hop, derived) | Caches past activations and trains with limited context, so no overlapping recomputation (arXiv 2312.17279) | NVIDIA NeMo; parakeet_realtime_eou_120m-v1 |
- Qwen3-ASR numbers: the paper reports 2.69 average WER offline vs 3.33 streaming for the 1.7B model, and 3.48 vs 4.40 for 0.6B, with streaming run at a 2 s chunk size (arXiv 2601.21337). It also reports an average time to first token as low as 92 ms for the 0.6B model.
- DSM-ASR: feeds Mimi tokens (12.5 Hz) and delays the text stream by a default 2.5 s, with timestamp precision of 80 ms (arXiv 2509.08753).
- Cache-aware Conformer: with a regular look-ahead, latency compounds with depth (1,360 ms for 17 layers and one token of look-ahead); chunk-aware look-ahead does not. On LibriSpeech test-other with an RNNT decoder, the cache-aware model reaches 6.3% WER at 1,360 ms, against 11.3% for buffered inference at 2,000 ms (arXiv 2312.17279).
- The model card lists a 120M-parameter cache-aware FastConformer-RNNT with 17 layers and latency of 80 to 160 ms.
Ecosystem
| Tool | What it adds |
|---|---|
| faster-whisper | CTranslate2 reimplementation; its README claims up to 4 times faster than openai/whisper at the same accuracy with less memory (README benchmark: 1m03s vs 2m23s, fp16, beam 5); batched inference; Silero VAD filter |
| whisper.cpp | C/C++ port for CPU and edge |
| WhisperX (arXiv 2303.00747) | VAD-based pre-segmentation ("VAD Cut & Merge") with batched inference for a twelve-fold speedup reported in the paper, and forced phoneme alignment for word-level timestamps; the repo notes that the alignment model is language-specific and overlapping speech is not handled well |
| distil-whisper (arXiv 2311.00430) | distil-large-v2: 2 decoder layers, 756M params, 5.8x faster, 51% fewer parameters; pseudo-labels filtered with a 10% WER threshold (45.4% dropped); less prone to long-form hallucination; works as a speculative-decoding assistant with identical outputs |
Interview insights
- Whisper got the recipe right: scale plus weak supervision gives robustness, and multitask tokens put ASR, translation and language ID in one model.
- It is wrong for voice products as shipped: fixed window, non-causal encoder and beam decoding hurt latency, and silence hallucination matters for agents.
- Newer encoders address this: the Open ASR Leaderboard authors find Conformer encoders with Transformer decoders give the best average WER (arXiv 2510.06961), and Qwen3-ASR uses a dynamic 1 to 8 s attention window to cover both streaming and offline (arXiv 2601.21337).
- AuT is the synthesis: Whisper-scale data with a streaming-friendly encoder.
"Whisper's recipe is right, but the architecture is wrong for voice agents: a fixed 30 s window and a bidirectional encoder. That is why GLM-4-Voice makes it causal and Qwen3-Omni replaces it with AuT, and why I would start from a streaming encoder."