Speech Technology for Conversational AI
M2 · P2 (announced) · Year 2 · Period 2
Contents
- Introduction and overview
- 0. Recap: the speech signal and its representations
- 1. Classical ASR: the GMM-HMM pipeline
- 2. CTC: the loss, derived
- 3. Encoder-decoder: LAS, Conformer, RNN-T
- 4. Whisper: robustness and multi-task
- 5. Streaming: chunking, VAD, latency vs quality
- 6. Vocoders: from WaveNet to HiFi-GAN
- 7. Neural TTS: Tacotron 2, VITS, diffusion and flow
- 8. Expressivity: prosody, style tokens, SSML
- 9. Voice conversion and cloning: ethics and watermarking
- 10. The conversational loop: VAD, turn-taking, full-duplex
- 11. Speech LLMs and multilingualism
- Exercises / Labs
- Projects and assessment
- References
Introduction and overview
| Module | Speech Technology for Conversational AI |
| Code | M2 · P2 (announced) — official code not published (course description not published) |
| Team and workload | Instructor: master’s team · ~24 h · building the complete voice loop — signal (Mel spectrogram/MFCC), ASR from GMM-HMM to CTC (loss derived), LAS, Whisper and streaming, TTS from the vocoder (WaveNet, HiFi-GAN) to diffusion/flow models, expressivity and cloning (ethics, audio watermarking), up to full-duplex conversational voices and speech LLMs — the bridge between Signal Processing (M1) and LLMs (M2). |
| Status in the program | M2AI-systems route · M2 program being finalized |
Audience: an NLP or signal-processing engineer who wants to master the full voice loop. Empirical first: the module starts from concrete failures — a word error rate of 4% in the studio that becomes 28% on a noisy phone line, a TTS system that clones a voice without any watermark — and only then names the tools (Mel features, CTC, Whisper, vocoders).
The course goes from recognition (ASR) to synthesis (TTS) to speech LLMs, and bridges Signal Processing (M1) and Large Language Models (M2).
What you will be able to do
- Choose and compute the representations of the speech signal (Mel spectrogram, MFCC) according to the use;
- Explain the classical GMM-HMM pipeline and what caused its replacement;
- Derive the CTC loss (sum over alignments, forward-backward) and implement it;
- Compare LAS, Conformer and RNN-T according to the quality/latency trade-off, and explain Whisper’s multi-task robustness;
- Size a streaming system: chunking, voice activity detection, latency vs quality;
- Explain the modern TTS chain: vocoders (WaveNet to HiFi-GAN), Tacotron 2, VITS, diffusion and flow approaches;
- Control the expressivity of a synthesis (prosody, style tokens, SSML) and master the ethical issues of voice cloning;
- Describe the complete conversational loop (VAD, turn-taking, full-duplex) and how multilingual speech LLMs work.
Official objectives and syllabus
Official course description not published (S3/S4 catalog empty): as of the start of the 2026 academic year, the “LLGA 2 – Semestre 3” and “LLGA 2 – Semestre 4” tracks of the 2026-2027 SynapseS catalog still list no courses, and the master’s wiki indicates that the detailed M2 program is “under development” (period 2: “to be completed soon”).
The program below therefore reflects the master’s brochure (period 2), with an indicative volume of ~24 h; these course materials are calibrated to that volume, i.e. about two hours of work per chapter, labs included.
The following table maps each brochure theme to the course sections; the materials’ own additions are marked “going beyond the syllabus”.
| Brochure theme | Course section covering it |
|---|---|
| Speech signal and its representations (Mel spectrogram, MFCC) | ch. 0 |
| ASR: from GMM-HMM to CTC (loss derived) | ch. 1 (GMM-HMM pipeline) and ch. 2 (CTC derived) |
| ASR: encoder-decoder architectures and Whisper | ch. 3 (LAS, Conformer, RNN-T) and ch. 4 (Whisper) |
| Streaming: latency vs quality | ch. 5 (chunking, VAD) |
| TTS: vocoders (WaveNet, HiFi-GAN) and diffusion/flow models | ch. 6 (vocoders) and ch. 7 (Tacotron 2, VITS, diffusion) |
| Expressivity (prosody, style tokens, SSML) | ch. 8 |
| Voice cloning: ethics and audio watermarking | ch. 9 |
| Full-duplex conversational voices | ch. 10 (VAD, turn-taking) |
| Speech LLMs and multilingualism | ch. 11 |
| Going beyond the syllabus — labs (CTC alignment, WER, audio watermarking) | Exercises / Labs |
Where this course fits in the program
An M2 module announced for period 2 and preselected by the AI-systems route of the home page: it is the master’s “multimodal” module devoted to the audio modality, designed as the joint production deployment of two prerequisites. Prerequisites: Signal Processing (windowing, Fourier transform, spectrograms — revisited in ch. 0) and Large Language Models, whose multimodal chapter (ch. 8) announces the speech LLMs covered here at the end of the course.
Downstream: the module gives its voice component to the conversational assistant — the LLGA’s application through-line, which crosses the agents of Advanced Topics in Large Language Models (ch. 9) and the production constraints of ML Ops and LLM Engineering Principles (P99 latency, costs). It extends to audio the text watermark of LLMs ch. 9.5; readers of the Graph × LLM route find the same ideas in Control in Generative AI, which this page never requires.
Course outline
- Recap: the speech signal and its representations — windowing, Mel spectrograms and MFCC: the raw material of the whole course.
- Classical ASR: the GMM-HMM pipeline — the historical architecture, still useful to understand what neural methods replaced.
- CTC: the loss, derived — learning without frame/phoneme alignment: the complete derivation of the loss that opened up deep ASR.
- Encoder-decoder: LAS, Conformer, RNN-T — three architectural answers to the quality/latency trade-off.
- Whisper: robustness and multi-task — what very large-scale supervised learning changes (and costs).
- Streaming: chunking, VAD, latency vs quality — going from file to stream: split, detect speech, own the latency.
- Vocoders: from WaveNet to HiFi-GAN — generating the waveform itself, and the path from slow autoregressive models to fast GANs.
- Neural TTS: Tacotron 2, VITS, diffusion and flow — modern synthesis from text to spectrogram then to signal.
- Expressivity: prosody, style tokens, SSML — not only saying, but how to say it.
- Voice conversion and cloning: ethics and watermarking — the promises of cloning, its misuse, and how to mark generated audio.
- The conversational loop: VAD, turn-taking, full-duplex — listening, waiting one’s turn, interrupting oneself: real-time orchestration.
- Speech LLMs and multilingualism — the speech signal fed directly into the language model: architectures and issues for low-resource languages.
- Exercises / Labs — align a CTC, measure a WER, synthesize and watermark a voice clip.
- Projects and assessment — solo and group subjects, a written-exam proposal and a grading rubric, all labelled as proposals.
- References — the founding papers of neural ASR and TTS.
Session plan
24 h in class (announced) = 8 sessions of 3 h. The SynapseS 2026–2027 sheet publishes no volume for this module; 24 h is the indicative volume quoted with the brochure programme in the fiche above, and also the M2 volume published for the Large Language Models course (CSC_53432_EP: 24 h, 2 ECTS); the session split below is our proposal for covering these notes in that time.
Level 1 = foundations (reviews, definitions, first worked examples), 2 = core methods, 3 = advanced material (recent research: full-duplex dialogue, speech LLMs); the level never goes down from one session to the next.
| Session | Hours | Level | Content | Practice |
|---|---|---|---|---|
| 1 | 3 h | 1 | ch. 0 Recap: the speech signal, ASR and TTS formalized, WER; ch. 1 Classical ASR: GMM-HMM | compute a WER by hand on two sentences (Definition 0.1) |
| 2 | 3 h | 2 | ch. 2 CTC: the loss and its forward-backward, derived | Ex. 3, 4 |
| 3 | 3 h | 2 | ch. 3 Encoder-decoder: LAS, Conformer, RNN-T; ch. 4 Whisper | Ex. 1 |
| 4 | 3 h | 2 | ch. 5 Streaming: latencies, chunking, VAD; ch. 6 Vocoders | Ex. 5(a)–(b), 7 |
| 5 | 3 h | 2 | ch. 7 Neural TTS: Tacotron 2, VITS, diffusion and flow | Ex. 2(a)–(b), (e) |
| 6 | 3 h | 2 | ch. 8 Expressivity; ch. 9 Voice conversion, cloning, ethics, watermarking | Ex. 2(c)–(d), 6 |
| 7 | 3 h | 3 | ch. 10 The conversational loop: turn-taking, endpointing, full-duplex | Ex. 5(c) |
| 8 | 3 h | 3 | ch. 11 Speech LLMs and multilingualism | Ex. 8 (per-language WER with Whisper and MMS, Proposition 11.3) |
Self-study, outside the 24 h: no chapter — every chapter is covered in class; the four labs (Ex. 1, 2, 7 and 8) each need about 2 h of personal work.
How to study this module
- Listen to every example audio of the course (originals, degraded, synthesized): the ear is here a measuring instrument to train as much as the WER.
- Write the CTC forward-backward yourself on a mini-example by hand: it is the obligatory step to never again confuse alignment and decoding.
- For each architecture, place it on the “latency/quality” axis and note what is computed online versus offline: it is the module’s reading grid.
- Wire up a mini “microphone → ASR → response → TTS → speaker” loop early, even a basic one, then improve it chapter after chapter. This loop is the speech front end of the Year 2 transverse project Y2.3, a voice-first assistant for 3D products.
- Read ch. 9 (cloning, ethics) with the eye of a future professional: questions of consent and audio watermarking will arise in your projects from the internship onward.
The LLGA perspective With speech LLMs, voice has become a first-class modality for language models: the LLGA master, which trains at the crossroads of LLMs and their applications, offers you here the complete chain — from spectrogram to speaking turn — rather than a simple overview. Conversational assistants (telephony, accessibility, embedded voice interfaces) are one of the most in-demand career paths in the field, and the module crosses all the master’s skills: signal, LLMs, real-time streaming, ethics and control.
0. Recap: the speech signal and its representations
Every model of this module reads or writes a spectrogram, so the course starts from the signal. This chapter recalls what the Signal Processing module established, then states the two problems of the module — recognition and synthesis — and how recognition is scored.
Prerequisites (Signal Processing M1 module) — what is assumed known
- Sampling (ch. 4): Shannon’s theorem; speech is sampled at 16 kHz (ASR) or 24 kHz (synthesis), useful telephone band 300-3400 Hz, formants up to ~8 kHz;
- Time-frequency analysis (ch. 6): STFT, Gabor windows, time-frequency trade-off — the spectrogram is the input of almost all the models in this module (cf. Signal Processing module ch. 6);
- Mel spectrogram and MFCC (ch. 8): 25 ms frames every 10 ms, Hann window, Mel filter bank (perceptual scale linear below 1 kHz then logarithmic: m = 2595\log_{10}(1 + f/700)), 20-80 coefficients, possibly DCT (MFCC);
- Random signals (ch. 7): power spectral density, periodogram — used by energy-based VADs (ch. 10) and spread-spectrum watermarking (ch. 9);
- Recurrent networks and transformers (Deep Learning P1 ch. 5–6, or Deep Learning P2 ch. 0, “From MLP to transformer block” on the AI-systems route): LSTM, attention \mathrm{softmax}(QK^\top/\sqrt{d_k})V with d_k the key dimension — the ASR/TTS encoder is a transformer (ch. 3-4);
- VAE, GAN and diffusion (Multimodal GenAI ch. 1–3, or Deep Learning P2 ch. 7.3 on the AI-systems route): ELBO, adversarial training, DDPM and noise prediction — the vocoders (ch. 6) and generative TTS models (ch. 7) descend directly from them. Normalizing flows and flow matching (Multimodal GenAI 4.3, absent from Deep Learning P2) are restated in ch. 7.
Definition 0.1 — ASR and TTS, formalized Recognition (ASR): estimate the transcription y (sequence of tokens — characters, phonemes, BPE) of an acoustic frame x_{1:T} (Mel features, typically T \approx 100 frames per second of speech, one every 10 ms): model p_\theta(y \mid x_{1:T}).
Synthesis (TTS): the inverse, p_\theta(x \mid y) — a one-to-many problem: a text can be said in infinitely many ways (voice, rate, emotion), which will structure all of ch. 7-8 (TTS is a generation problem, ASR a decision problem).
The reference ASR error is the WER: \mathrm{WER} = \frac{S + D + I}{N}, substitutions/deletions/insertions obtained by word-level Levenshtein alignment between hypothesis and reference (lab 1).
The module’s line — and why “conversational” The course follows the stack of a voice assistant: understand (ch. 1-5), speak (ch. 6-9), converse (ch. 10-11).
The technical thread: two breaks occurred —
- the abandonment of explicit alignment (HMM → CTC → attention → discrete tokens);
- the fusion of the three ASR+LLM+TTS building blocks into a single multimodal model (speech LLMs, ch. 11) that speaks and listens — where full-duplex conversation (ch. 10) becomes computable.
Speech regains its status there: the fastest (3-4 words/s produced, 5-8 understood) and most natural interface.
Module status Course proposed in the M2 brochure (period 2): the instructors are not yet confirmed; there is therefore no “research of the instructor” chapter — the content follows the standards of the field and constantly builds on the modules already covered (Signal Processing M1 for the signal, LLMs M2 for the language layer).
1. Classical ASR: the GMM-HMM pipeline
A recognizer tuned on call-center audio collapses as soon as the accent or the microphone changes. To understand why, and what neural systems changed, this chapter presents the architecture that dominated speech recognition for thirty years: an acoustic model of sounds, a lexicon and a language model, combined by Bayesian decoding.
What breaks Three mistakes recur in this module: ignoring the acoustic domain (microphone, noise, accent) in which a system will be used, judging a recognizer by its WER alone, which ignores meaning, and deploying voice cloning without consent or watermarking (ch. 9).
The historical pipeline (1980-2015) survives only as technical memories — but its formalism (emission model, chain of states, Bayesian decoding) reappears everywhere, up to the CTC forward-backward (ch. 2). We cover it in one structured chapter.
Theorem 1.1 — The GMM-HMM acoustic model and decoding One decomposes p(x_{1:T} \mid w) with a hidden Markov chain over phonetic states z_t \in \{1, \dots, K\}, with transitions a_{ij}; the observations are the acoustic frames x_t (written o_t on the notation page).
Each phoneme is a 3-state left-to-right HMM (beginning/middle/end), put in context (triphones); the emission b_j of state j is a Gaussian mixture over the MFCCs (39 dimensions: 13 + first and second derivatives): b_j(x_t) = p(x_t \mid z_t = j) = \sum_{m=1}^{M_j} c_{jm}\, \mathcal N(x_t;\ \mu_{jm}, \Sigma_{jm}).
The retained transcription maximizes Bayesian decoding \hat w = \arg\max_w\ p(x_{1:T} \mid w)\, p_{\mathrm{LM}}(w), where p_{\mathrm{LM}} is an n-gram language model with smoothing (NLP section 1.3).
The likelihood is computed by the forward recursion on \alpha_t(j) = p(x_{1:t}, z_t = j), which includes the emission at t: \alpha_t(j) = \Big[\sum_i \alpha_{t-1}(i)\, a_{ij}\Big]\, b_j(x_t), (\mathcal O(T K^2) for K states) and the best path by Viterbi (same recursion, max instead of the sum). Both are derived in NLP ch. 6, in the notation of the site’s HMM conventions.
Training: EM (Baum-Welch) — cf. Machine Learning M1 module ch. 7 for the EM of latent-variable models.
Proposition 1.2 — Why GMM? And why is it dead?
- A Gaussian mixture is a universal density approximator (with enough components, any continuous density is approximated): it was the best parameterization before deep learning.
- Fatal flaws: MFCCs are not semantic features (the GMM models acoustic blocks, knows nothing about similar phones); the HMM assumes the signal locally stationary per state and conditional independence of the frames; above all, each piece (lexicon, contexts, LM) is optimized separately — impossible to align globally.
Neural systems eat raw data: 10,000 labeled hours replace 300 carefully curated ones (ch. 4).
What survives of the pipeline Three direct legacies:
- the acoustic + LM fusion at decoding (the “shallow fusion” reappears with LLMs to rescore N-bests);
- the forward-backward — the central algorithm of CTC in the next chapter;
- forced alignment (finding the instants of each word, still used for subtitling and training TTS).
Historical reference: Rabiner’s tutorial (Proc. IEEE, 1989) remains a limpid read.
2. CTC: the loss, derived
The central problem of neural ASR: the output (sequence of tokens y) is shorter than the input (T frames) and unaligned — there is no label per frame. The solution of Graves et al. (ICML 2006): marginalize over all possible alignments. We derive everything: this is technical chapter no. 1 of the module.
Definition 2.1 — Alignments and collapse The network emits at each frame a distribution p_\theta(\cdot \mid x_{1:T}, t) over the extended alphabet \mathcal V \cup \{\epsilon\} (\epsilon = blank). A path \pi \in (\mathcal V \cup \{\epsilon\})^T is a sequence of T symbols, drawn independently: p(\pi \mid x) = \prod_{t=1}^T p_\theta(\pi_t \mid x, t).
The collapse map \mathcal B first merges consecutive repetitions, then removes the blanks: \mathcal B(\texttt{hheelllo}) = \texttt{helo} (each run of identical symbols counts once). Conversely, doubles separated by a blank survive: \mathcal B(\texttt{l}\,\epsilon\,\texttt{l}) = \texttt{ll}, so that \mathcal B(\texttt{hhe}\,\epsilon\,\texttt{l}\,\epsilon\,\texttt{lo}) = \texttt{hello} — that is the whole art of CTC.
The CTC loss marginalizes: p_\theta(y \mid x) \;=\; \sum_{\pi \in \mathcal B^{-1}(y)} p(\pi \mid x), \qquad \mathcal L_{\mathrm{CTC}} = -\log p_\theta(y \mid x).
Why the blank is indispensable: without it, a collapsed \texttt{ll} could not be distinguished from \texttt{l} — impossible to write “bonne” with a double n. The blank carries the boundary information.
Key result — the CTC loss \mathcal L_{\mathrm{CTC}} = -\log \sum_{\pi \in \mathcal B^{-1}(y)} \prod_{t=1}^T p_\theta(\pi_t \mid x, t)
Example 2.2 — Counting by hand (T = 4, y = “ab”) Extended sequence \ell = (\epsilon, a, \epsilon, b, \epsilon): the label with a blank before, between and after the letters (length S = 2|y| + 1 = 5).
A path of length 4 collapses to \texttt{ab} exactly when it reads “blanks, a run of a, blanks, a run of b, blanks”, each run of blanks possibly empty (writing \texttt{-} for \epsilon).
Since the runs of a and b take at least one frame each, the two remaining frames are distributed among five runs: \binom{6}{2} = 15 \text{ paths:}
- two blanks: \texttt{--ab}, \texttt{-a-b}, \texttt{-ab-}, \texttt{a--b}, \texttt{a-b-}, \texttt{ab--};
- one blank: \texttt{-aab}, \texttt{-abb}, \texttt{aa-b}, \texttt{aab-}, \texttt{a-bb}, \texttt{abb-};
- none: \texttt{aaab}, \texttt{aabb}, \texttt{abbb}.
A path such as \texttt{a-ab} is not valid: the blank separates the two a’s, which then both survive (\mathcal B = \texttt{aab}).
Each path contributes its product of 4 probabilities: p(y \mid x) is the sum of the 15; exercise 3 computes it for numerical values, exercise 4 checks with the implementation.
The number of paths grows exponentially (up to (|\mathcal V| + 1)^T): direct summation is impossible — hence the forward-backward.
Theorem 2.3 — CTC forward-backward (recursions and gradient, proven) Let p_t(k) = p_\theta(k \mid x, t), and \ell the extended sequence. The forward variables \alpha_t(s) = p(\ell_{1:s} \text{ reached at frame } t) follow \alpha_t(s) = \Big[\alpha_{t-1}(s) + \alpha_{t-1}(s{-}1) + \mathbf 1\{\ell_s \neq \epsilon,\ \ell_s \neq \ell_{s-2}\}\, \alpha_{t-1}(s{-}2)\Big]\cdot p_t(\ell_s), initialized \alpha_1(1) = p_1(\epsilon), \alpha_1(2) = p_1(\ell_2), the rest at 0 (one cannot “jump” ahead).
Symmetrically, the backward variable \beta_t(s) is the probability of completing \ell from position s at frame t, over frames t{+}1 to T.
As for the HMM (Theorem 1.1 and the site’s HMM conventions), \alpha includes the emission at t and \beta excludes it; Graves et al. (2006) put it in both and divide their product by p_t(\ell_s).
Write \mathrm{pos}_t for the position of \ell that a path occupies at frame t. Then p(y \mid x) = \alpha_T(S) + \alpha_T(S{-}1), \qquad \alpha_t(s)\,\beta_t(s) = p\big(y,\ \mathrm{pos}_t = s \mid x\big), and the gradient of the loss is written in closed form \frac{\partial \mathcal L_{\mathrm{CTC}}}{\partial p_t(k)} = -\,\frac{1}{p(y \mid x)}\ \frac{1}{p_t(k)} \sum_{s\,:\,\ell_s = k} \alpha_t(s)\, \beta_t(s).
Proof. Step 1 (decomposition by the state at t). The sum over paths partitions according to the position s occupied at frame t. Each path passing through \ell_s at t factorizes into three factors: \text{(prefix reaching } \ell_s \text{ at } t) \times p_t(\ell_s) \times (\text{suffix from } \ell_s \text{ at } t{+}1) — hence \alpha_t(s)\beta_t(s) = p(y, \mathrm{pos}_t = s \mid x) (a label that occurs at several positions of \ell, such as \epsilon, gets one such term per position; careful: with the convention above, \alpha_t(s) contains p_t(\ell_s) and \beta_t(s) does not, so the product counts the factor once).
Step 2 (recursion). For the path to be at \ell_s at t, it was at s, s{-}1 or s{-}2 at t{-}1.
The jump of two positions is forbidden except if \ell_s is a real letter different from \ell_{s-2} (otherwise two identical letters would be merged by the collapse; and one never jumps over a letter).
Step 3 (gradient). p(y \mid x) = \sum_{\pi} \prod_{t'} p_{t'}(\pi_{t'}); each term using p_t(k) corresponds to the paths with \pi_t = k \in \ell, whose total sum equals \sum_{s:\ell_s = k}\alpha_t(s)\beta_t(s). Differentiating the log: \partial \mathcal L/\partial p_t(k) = -\partial p(y \mid x)/\partial p_t(k) \cdot 1/p(y \mid x), and \partial p(y \mid x)/\partial p_t(k) = \big[\sum_s \alpha\beta\big] / p_t(k) (each path where \pi_t = k is linear in p_t(k)).
Complexity: \mathcal O(T \cdot S) — two tables of T \times (2|y|+1), versus the exponential enumeration. ∎
Proposition 2.4 — CTC inference and model assumptions
- Greedy decoding: \hat y = \mathcal B(\arg\max_k p_t(k)\ \text{for each } t) — fast, suboptimal; beam search: maintain K prefixes with their truncated \alpha scores, merge equal prefixes after collapse, optionally rescored by an LM.
- Assumptions of CTC: conditional independence of the frames (no internal language model — hence the external LM) and monotone distribution (the alignment goes left to right): perfect for reading, forbidden for translation (ch. 3 to break free of it).
CTC’s posterity CTC lives everywhere in 2026: forced alignment (ch. 1), the pre-training of wav2vec 2 (CTC objective), and — above all — RNN-T (ch. 3) is a CTC extended to real time, with a blank reinterpreted as “move forward in time”.
By contrast, Whisper is not CTC (attention encoder-decoder, ch. 4): knowing how to say “this one marginalizes alignments, that one generates them” is a classic oral-exam question.
3. Encoder-decoder: LAS, Conformer, RNN-T
CTC assumes that the frames are conditionally independent and has no language model of its own. This chapter presents the three architectures that lift these limits in different ways — by learning the alignment with attention (LAS), by improving the encoder (Conformer), or by adding a prediction network while keeping streaming possible (RNN-T).
Theorem 3.1 — LAS: Listen, Attend and Spell (Chan et al., ICASSP 2016) Listen: a pyramidal BLSTM (then transformer) encoder compacts the frames x_{1:T} into states h_j.
Attend: at each output step i, an additive attention computes e_{ij} = v^\top \tanh\big(W_s s_{i-1} + W_h h_j\big), \qquad \alpha_{ij} = \frac{\exp e_{ij}}{\sum_{j'} \exp e_{ij'}}, \qquad c_i = \sum_j \alpha_{ij}\, h_j, (location-sensitive attention in practice: the past weights a_{i-1} enter e_{ij} to make it monotone and avoid skipped/repeated words).
Spell: an autoregressive decoder emits y_i from (s_{i-1}, y_{i-1}, c_i), trained by teacher forcing and cross-entropy.
The loss is no longer a marginalization: the attention learns the alignment — and can reorder it (used for speech translation).
Two inherited weaknesses: exposure bias (trained on the reference, tested on its own errors) and the impossibility of strict streaming (all of x is read before the first token).
Proposition 3.2 — Conformer: local convolution + global attention (Gulati et al., Interspeech 2020) The Conformer block chains (“macaron” style) two feed-forward networks with a 1/2 factor around
- a multi-head attention with relative positional encoding (captures long context — sentences span hundreds of frames), and
- a convolution module (LayerNorm \to pointwise convolution \to GLU \to depthwise convolution \to BatchNorm \to Swish \to pointwise convolution, inside a residual connection, with no dilation) that captures local phonetics (formants, transitions).
The takeaway intuition: attention alone is bad at the fine local patterns of speech, convolution alone does not see the context — the sandwich of the two dominated industrial ASR 2021-2024 (before being absorbed by the foundation models of ch. 4: wav2vec 2, HuBERT, Whisper encoder).
Theorem 3.3 — RNN-T (Graves, 2012): the CTC that speaks in real time The RNN-transducer combines an encoder f_t (frame \to state; causal in streaming systems, so processed on the fly) and a prediction network g_u (tokens already emitted \to state); a joint network produces P(k \mid t, u) = \mathrm{softmax}\big(W\, f_t + W'\, g_u + b\big)_{k}, \qquad k \in \mathcal V \cup \{\epsilon\}, and the likelihood sums over all paths of the (t, u) grid — it is the forward-backward of Theorem 2.3, transposed onto a T \times U trellis where \epsilon = “advance in t without emitting”.
Decisive property: nothing in the loss needs the future, so the encoder can be causal (Graves’s original used a bidirectional one; on-device systems use a causal or short-lookahead encoder), and each f_t is then computable as soon as the frame arrives — RNN-T is the queen architecture of streaming ASR (ch. 5), notably on device.
Cost: an \mathcal O(TU) lattice at training and the CTC monotonicity assumption (no reordering).
| Architecture | Alignment | Loss | Streaming | Internal LM? | Typical use |
|---|---|---|---|---|---|
| GMM-HMM (ch. 1) | explicit states | EM (Baum-Welch) | yes | no (n-gram) | legacy, old telephony |
| CTC (ch. 2) | marginalized, monotone | forward-backward | partial | no | forced alignment, pre-training |
| LAS (ch. 3) | learned (attention) | cross-entropy | no | yes (AR decoder) | offline, max quality |
| RNN-T (ch. 3) | monotone trellis | 2D forward-backward | yes | partial (prediction net) | assistants, mobile |
| Whisper (ch. 4) | generated (attention) | multi-task cross-entropy | no (30 s windows) | yes | general transcription |
4. Whisper: robustness and multi-task
The architectures of chapter 3 were trained on a few thousand carefully transcribed hours and broke on real-world audio. This chapter shows how Whisper obtained robustness from a plain encoder-decoder trained on a very large amount of imperfectly labelled web audio.
Theorem 4.1 — Whisper (Radford et al., ICML 2023): the strength of the weak Trained on \approx 680,000 hours of weakly supervised audio/text pairs collected from the web (versus a few hundred to thousand carefully curated hours before), Whisper is a simple transformer encoder-decoder (39M-1.5B parameters); the audio is cut into 30 s windows, log-Mel 80 bins.
The output is a sequence of special tokens + text: <|startoftranscript|> \to language \to task (transcribe/translate into English) \to timestamps \to text — everything (language identifier, translation decision, time) is learned as language, no dedicated module.
Results: unprecedented robustness to noise/reverberation/accents (trained on real, not read data), WER close to humans on clean English; best zero-shot performance on most languages at the time.
Proposition 4.2 — Why it works: the scaling law of dirty data
- Coverage: robustness is not a module, it is a consequence of diversity — the 680 kh cover real-world mess (background noise, music, accents), whereas LibriSpeech (1000 h of read books) overlearns clean reading;
- Filtering beats labeling: the training pipeline filters aggressively (language detection, audio-text matching by an initial ASR, anti-hallucination heuristics) rather than correcting by hand — the moderately clean but massive data wins;
- Multi-task as regularization: transcribing AND translating AND timestamping share one encoder — translation forces semantic, not only acoustic, representations.
Documented limits: hallucinations on long silences (looped repetitions — the model “invents” text), no native streaming (ch. 5), difficult fine specialization.
Example 4.3 — French in the crosshairs On clean English, a good system reaches human WER (~5%); the same model on spontaneous contemporary French typically does 2 to 3 times worse (accents, speaking rates, code-switching, proper names) — lab 1 measures it.
Three French phenomena to know for engineering:
- liaison (les amis is pronounced [le.za.mi]: the s of les is heard at the start of the next word — spelling is not phonetics, and the ASR must recover the written form);
- enchaînement (final consonant tied to the next vowel: word boundaries blur in the spectrogram);
- number verbalization (1996: “mille neuf cent quatre-vingt-seize” or “dix-neuf cent quatre-vingt-seize”? — normalization ambiguity, both are valid; cf. ch. 8 for the reverse direction in TTS).
5. Streaming: chunking, VAD, latency vs quality
Conversing means answering fast: the ASR must produce words while one speaks. This chapter deals with the “offline \to streaming” transformation, whose cost is measured in WER added per second gained.
Definition 5.1 — Latencies of a streaming ASR The algorithmic latency of a chunked encoder (chunking) of size L frames with a lookahead of R frames equals \lambda = (L + R)\,\Delta, \qquad \Delta = \text{frame step } (10\ \mathrm{ms}), — one cannot predict before having heard the context.
The real-time factor (RTF) measures the computational cost: computation time / audio duration (RTF < 1 required, \ll 1 on device). The first-word latency adds the VAD and the endpointing decision (ch. 10).
A conversational voice assistant targets \lambda \leq 300 ms end to end (exercise 5) — humans answer in ~200 ms (ch. 10): this is the structuring constraint of the field.
Theorem 5.2 — Three streaming architectures (Moritz et al., ICASSP 2020, for the first)
- Block attention: the transformer encoder processes windows of L frames with a complete left context (memory) and a bounded right lookahead R — the attention is masked beyond; the larger R grows, the more the WER drops and the latency rises (curve of Proposition 5.3);
- Causal RNN-T (Theorem 3.3): pure encoder L = 1, R = 0 — emission from the frame on, with no acoustic right context at all; the prediction network adds only left context (an internal language model over the tokens already emitted), which partly makes up for the missing lookahead; standard on mobile, often with a few frames of lookahead bought back for accuracy;
- Asynchronous re-scoring: a first streaming pass gives the real-time display, an offline model (Whisper) re-corrects the final transcription with a few hundred ms of delay — the interface shows the text “correcting itself” (the design of 2026 assistants: the truth arrives one second later, reactivity is immediate).
Proposition 5.3 — The latency/quality curve, and how to read it For each point (L, R) (or each model choice): measure WER and first-word latency on a fixed test corpus; plot WER(\lambda).
Typical shape: the WER is high at very small latency, drops quickly as \lambda grows to about 200-300 ms (the useful context of a phoneme and of its transitions fits in about 200 ms), then reaches a plateau where extra context no longer helps.
Engineer’s reading: choose the elbow point (lab: Ex. 7 traces this curve for a CTC model); scientific reading: the curve is a trade-off curve of fidelity against a resource, here reactivity — the same grid as the fidelity/diversity curves of the Control in Generative AI module (ch. 9, optional on this route).
VAD: the gateway of the stream Voice activity detection decides, window by window (10-30 ms), whether the frame contains speech: energy + periodicity (historical), energy/noise GMM (Signal module ch. 7), lightweight networks (Silero VAD — the lab’s tool).
Two errors of opposite cost: the false alarm sends noise to the ASR (Whisper hallucinations on silences!); the miss cuts word beginnings (the initial French “euh”).
The VAD also initiates endpointing — deciding that the user has finished speaking (ch. 10): even more sensitive, because it sets the perceived latency of the whole system.
6. Vocoders: from WaveNet to HiFi-GAN
Synthesis ends with a waveform: tens of thousands of samples per second, whose phase is not contained in the spectrogram. This chapter presents the vocoders that generate it, from the slow but faithful WaveNet to the fast HiFi-GAN used in production.
Theorem 6.1 — WaveNet (van den Oord et al., 2016): autoregression over the samples The vocoder models the waveform directly: p(x) = \prod_{t=1}^{T_{\mathrm{s}}} p(x_t \mid x_{<t},\, c), with T_{\mathrm{s}} the number of samples (24,000 per second of audio), x_t \mu-law quantized over 256 levels, c the conditioning (Mel, speaker).
Architecture: dilated causal convolutions — layer k looks 2^k samples back (dilations 1, 2, 4, …, 512, stacked): the receptive field grows exponentially with depth (\approx 2^L for L layers), where a non-dilated convolution would require 2^L layers.
Quality: close to human speech in subjective tests (MOS above 4, versus ~4.5 for the ground truth).
Fatal flaw: generating one second of speech takes 24,000 sequential steps — orders of magnitude slower than real time, unusable in production.
Proposition 6.2 — HiFi-GAN (Kong et al., NeurIPS 2020): speed through the adversary Complete reversal: the generator is parallel feed-forward (upsampling by transposed convolutions from the 80-bin Mel to the waveform, then multi-receptive-field dilated convolutions for phase coherence).
Training is adversarial (GAN recap: Multimodal GenAI ch. 2, or Deep Learning P2 ch. 7.3) with two families of discriminators — multi-period (they rearrange the waveform into matrices of periods 2, 3, 5, 7, 11 to trap periodic artifacts: the “buzz”) and multi-scale — plus an L1 loss on the reconstructed Mel to anchor the content.
Result: WaveNet quality, parallel generation — orders of magnitude faster than real time on GPU, the industry’s default vocoder.
To remember from the chapter: the opposition between sequential generation (autoregressive over 24,000 samples per second) and parallel architecture + perceptual losses dictates all of modern TTS.
The Mel as a contractual interface The two stages of the TTS (ch. 7) communicate via the Mel spectrogram: 80 bins, one frame roughly every 12 ms (~ 80 Hz), logarithmic scale — the vocoder’s specification sheet.
Changing the definition (sampling frequency, hop, n_bins) breaks the model/vocoder compatibility — lab 2, step (e), breaks it on purpose. And the Mel is not invertible (phase lost): the whole difficulty of the vocoder is to re-invent a coherent phase — hence the period discriminators.
7. Neural TTS: Tacotron 2, VITS, diffusion and flow
Given a vocoder, it remains to turn text into a spectrogram — a one-to-many problem, since a sentence can be said in many ways. This chapter follows the three generations of answers: an attention model that writes the Mel frame by frame, an end-to-end stochastic model, and iterative diffusion and flow models.
Theorem 7.1 — Tacotron 2 (Shen et al., ICASSP 2018): the two-stage scheme Stage 1: an attentional encoder-decoder reads the text (graphemes) and writes the Mel frame by frame — the location-sensitive attention learns the text→acoustic alignment there (same mechanism as LAS in ch. 3, applied in reverse); training by teacher forcing on the reference Mels.
Stage 2: a WaveNet (ch. 6) turns the Mel into a wave. Historical quality: natural on read sentences.
Two chronic diseases: attention failure (skipped or stuttered words on long or out-of-distribution sentences) and excessive determinism — one text, a single voice/rate (the one-to-many of Definition 0.1 denied by training toward the average Mel: smoothed, metallic output).
Proposition 7.2 — VITS (Kim et al., ICML 2021): one-stage, stochastic, end-to-end Three ideas that answer Tacotron’s diseases, and one objective.
- Conditional VAE: a posterior encoder reads the target speech (its linear spectrogram) and samples a latent z \sim q_\phi(z \mid x); the decoder (a HiFi-GAN generator, ch. 6) writes the waveform from z; the prior p_\theta(z \mid c) is conditioned on the text c. Sampling this prior explores the many ways of saying the same text.
- Normalizing flow in the prior: the text encoder alone gives a diagonal Gaussian, too simple for real speech latents; an invertible flow f_\theta (Definition 7.2b below) maps z onto it, p_\theta(z \mid c) = \mathcal N\big(f_\theta(z);\ \mu_\theta(c), \mathrm{diag}\,\sigma_\theta^2(c)\big)\, \big|\det J_{f_\theta}(z)\big|, a richer text-conditioned prior whose density stays exact. At inference: sample the Gaussian, invert the flow, decode.
- Implicit monotone alignment (MAS: dynamic-programming search for the best monotone alignment between the text and the speech latent, redone at each training step), with a duration predictor for inference.
Objective: minimize the negative ELBO — an L1 loss between the Mel of the generated wave and that of the target, plus the KL term \mathrm{KL}\big(q_\phi(z \mid x) \,\|\, p_\theta(z \mid c)\big) — and add adversarial and feature-matching losses on the waveform and a duration loss. This is a bound plus a GAN, not an exact likelihood: the flow only keeps the prior’s density computable, so that the KL term can be evaluated on a sampled z.
Result: a single text→wave network, parallel, stochastic — the first “industrializable” generation of TTS (YourTTS, ch. 9, derives from it).
Definition 7.2b — Normalizing flow: change of variables and affine coupling A normalizing flow is an invertible, differentiable map f of \mathbb R^d that sends a complicated variable z to a simple one u = f(z) with a known density p_U, usually a Gaussian. The density of z is then exact: \log p_Z(z) = \log p_U\big(f(z)\big) + \log\big|\det J_f(z)\big|, \qquad J_f = \frac{\partial f}{\partial z}. For a composition f = f_K \circ \dots \circ f_1, the log-determinants add up.
The building block that keeps this computable is the affine coupling layer (Dinh, Sohl-Dickstein and Bengio, 2017). Split z = (z_a, z_b), keep the first half and transform the second: y_a = z_a, \qquad y_b = z_b \odot \exp\big(s(z_a)\big) + m(z_a), with scale s and shift m two arbitrary networks. Then:
- the inverse is explicit, z_b = (y_b - m(y_a)) \odot \exp(-s(y_a)), and never inverts s or m;
- the log-determinant costs \mathcal O(d) instead of the \mathcal O(d^3) of a general determinant: \log\big|\det J\big| = \sum_j s_j(z_a).
Layers alternate the two halves so that every coordinate is transformed. VITS uses the volume-preserving variant s = 0: its log-determinant is zero, and the expressiveness sits in the shifts. The same statements, written for the generating direction, are Proposition 4.3 and Definition 4.4 of Multimodal GenAI 4.3.
Proof. Change of variables. For a measurable set A, \mathbb P(z \in A) = \mathbb P\big(u \in f(A)\big) = \int_{f(A)} p_U(u)\, du = \int_A p_U\big(f(z)\big)\, \big|\det J_f(z)\big|\, dz, by the substitution u = f(z), so the integrand is the density of z. For a composition, the chain rule makes J_f a product of Jacobians, and determinants multiply.
Coupling. With the kept half first, the top blocks of the Jacobian are \partial y_a/\partial z_a = I and \partial y_a/\partial z_b = 0. Below them, the block \partial y_b/\partial z_a can be anything, and \partial y_b/\partial z_b is diagonal with entries e^{s_j(z_a)}. The Jacobian is block lower-triangular, so its determinant is the product of the diagonal entries, \prod_j e^{s_j(z_a)}. ∎
Theorem 7.3 — Iterative generation arrives: Grad-TTS then Voicebox
Grad-TTS (Popov et al., ICML 2021): an encoder predicts, for each phone, a target mean in Mel space; a duration predictor expands it into a frame-level mean Mel \mu (aligned with the target by MAS during training). A diffusion decoder then generates the Mel around \mu.
The forward diffusion is a stochastic differential equation over t \in [0, 1], with noise schedule \beta_t, that drifts every Mel X_0 toward \mathcal N(\mu, I) — noise centred on the encoder output, not \mathcal N(0, I): dX_t = \tfrac12\, \beta_t\, (\mu - X_t)\, dt + \sqrt{\beta_t}\, dW_t . With \gamma_t = \int_0^t \beta_s\, ds and \lambda_t = 1 - e^{-\gamma_t}, it has the closed form X_t = e^{-\gamma_t/2} X_0 + \big(1 - e^{-\gamma_t/2}\big)\, \mu + \sqrt{\lambda_t}\, \varepsilon, \qquad \varepsilon \sim \mathcal N(0, I).
Training objective (denoising score matching): a score network s_\theta(X_t, \mu, t) regresses the score of this Gaussian, which is -\varepsilon/\sqrt{\lambda_t}: \mathcal L_{\mathrm{diff}}(\theta) = \mathbb E_{t,\, X_0,\, \varepsilon}\Big[\lambda_t\, \big\| s_\theta(X_t, \mu, t) + \varepsilon/\sqrt{\lambda_t} \big\|^2\Big], added to an encoder loss (the target Mel must be likely under \mathcal N(\mu, I)) and a duration loss. Writing s_\theta = -\varepsilon_\theta/\sqrt{\lambda_t} turns \mathcal L_{\mathrm{diff}} into the noise-prediction loss of DDPM.
Sampling: draw X_1 \sim \mathcal N(\mu, I) and integrate backward in time, with a few Euler steps, the ODE \frac{dX_t}{dt} = \tfrac12\, \beta_t\, \big(\mu - X_t - s_\theta(X_t, \mu, t)\big).
Quality grows with the number of steps… like latency: the step/quality curve plays, for TTS, the role of the WER(\lambda) curve of ch. 5.
Voicebox (Le et al., 2023): conditional flow matching in infilling mode. Time runs the other way here, as in the flow-matching papers and in Multimodal GenAI 4.3: x_0 \sim \mathcal N(0, I) is noise, x_1 the target Mel, and the straight path x_t = (1 - t)\, x_0 + t\, x_1 has the constant velocity x_1 - x_0 (Voicebox adds a tiny noise floor, omitted here).
A binary mask m marks the frames to regenerate. A network v_\theta sees x_t, the frame-aligned phones y and the unmasked context (1 - m) \odot x_1, and regresses the velocity on the masked frames only: \mathcal L_{\mathrm{CFM}}(\theta) = \mathbb E_{t,\, x_0,\, x_1,\, m}\Big[\big\| m \odot \big(v_\theta\big(x_t, t;\ y, (1 - m) \odot x_1\big) - (x_1 - x_0)\big) \big\|^2\Big].
Its minimizer is the marginal velocity field, whose ODE carries \mathcal N(0, I) to the speech distribution given the context (Lipman et al., 2023; proved as Theorem 4.6 of Multimodal GenAI). Sampling integrates \dot x = v_\theta from t = 0 to t = 1 on the masked frames, the context remaining fixed.
Immediate applications: editing a word in a sentence while keeping the voice, de-noising, voice translation… and zero-shot cloning from a few seconds of reference (the prompt is the context, the new sentence the masked part).
Non-autoregressive and parallel: the dominant family of research TTS 2024-2026.
| System | Paradigm | Alignment | Stochastic? | Streaming | Native cloning |
|---|---|---|---|---|---|
| Tacotron 2 + WaveNet | AR attention + AR vocoder | learned attention | no | no | no |
| VITS | VAE + flow + GAN | implicit MAS | yes (prior) | difficult | via speaker emb. (YourTTS) |
| Grad-TTS | diffusion to Mel | predicted durations | yes (initial noise) | per step | no |
| Voicebox | flow matching, infilling | none (conditioned) | yes | region by region | yes (3 s prompt) |
Example 7.4 — Latency budget of a conversational TTS Goal: < 300 ms between the end of the LLM’s decision and the first sound.
- An AR Tacotron-like: the first sentence must be synthesized before the first sound (if one wants the intonation) — 1-2 s of lead time required: prohibitive.
- VITS: no autoregression and no intermediate Mel — one parallel pass produces the latent of the whole sentence, and the convolutional decoder can render it in overlapping chunks: ~100 ms to the first sound of a short sentence on a GPU. But nothing can be played before the sentence’s text is complete, hence the “difficult” streaming of the table.
- Voicebox: one must bound the number of sampling steps: 4-10 steps (instead of 50-100) with distillation, otherwise quality drops (the curve of thm. 7.3).
Conclusion: the full-duplex of ch. 10 was only possible after the non-autoregressive revolution — architecture and conversation are coupled constraints.
8. Expressivity: prosody, style tokens, SSML
A synthesis can be intelligible and still sound flat or say a sentence with the wrong intention. This chapter describes what expressivity is made of and the two ways of controlling it: soft control through learned style latents, hard control through markup.
Hard and soft control, in one paragraph A hard control is a constraint that the output satisfies exactly, by construction: a mask or a grammar on the tokens, a markup that the engine must execute (an exact pause, a forced pronunciation). It is guaranteed but rigid. A soft control shifts the output distribution through a conditioning signal — a prompt, an embedding, a guidance weight, a latent direction. It is natural and composable, but no output is guaranteed to obey it, so it is checked by measurement. Control in Generative AI (ch. 2, optional here) refines the two into four families.
Definition 8.1 — Prosody, three continuous sliders The manner of saying decomposes into F_0 (melody, in Hz — ~100-200 Hz for men, 160-300 for women, final fall of declarative utterances), duration (contrastive lengthening: a stretched “énorme”), energy (accents, stressed words).
These sliders are continuous and intertwined: the TTS must predict them all, and text alone is ambiguous (one neutral sentence, ten valid readings) — it is the one-to-many of ch. 7, aesthetic version.
French adds its signature: final group accent (not lexical as in English), interrogative rise without inversion, sustained rate that makes segmentation critical.
Theorem 8.2 — Global Style Tokens (Wang et al., ICML 2018): style as a controllable latent A reference encoder reads a reference audio (a few seconds) and produces an embedding; an attention reads this embedding over a bank of style tokens (small learned dictionary of “manners of saying”); the weighted vector conditions the Tacotron (rendezvous of ch. 7).
Three uses:
- transfer (give the audio of an enthusiastic speaker, generate the target text with their prosody);
- control (move the embedding in token space — attenuate “aggressive”);
- exploration (the tokens spontaneously organize into interpretable axes: rate, energy, emotion).
It is a soft control in the sense of the note above, close to the steering vectors of the Control module (ch. 4, optional): both act at inference by moving a conditioning vector in a latent space — same virtues (composable), same limits (no guarantee). The difference: a steering vector is read from contrasts on a frozen model, whereas the style tokens are learned jointly with Tacotron, without style labels, from the reconstruction loss alone.
Definition 8.3 — SSML: the hard control of production The Speech Synthesis Markup Language (W3C) is the control language of industrial TTS: pauses (<break time="500ms"/>), rate/pitch (<prosody rate="+10%" pitch="+2st">), emphasis (<emphasis>), pronunciation (<phoneme alphabet="ipa" ph="ʁə.ʒan">), dates and numbers.
It is a hard constraint in the sense of the note at the start of this chapter: the engine is obliged to obey (exact pause), as opposed to the soft conditioning of style tokens.
Text normalization (front-end): “1 234 567 €” \to “un million deux cent trente-quatre mille cinq cent soixante-sept euros” is the hidden half of TTS — neural systems integrate the front-end (letter tokenizer) at the price of amusing errors (acronyms, “SARS-CoV-2”: to be tested in lab 2).
Controlling what, and how: the complete grid Chapter recap in the hard/soft taxonomy of the note at the start of this chapter:
| Target | Soft mechanism | Hard mechanism |
|---|---|---|
| Voice | speaker embedding (ch. 9) | per-speaker model (fine-tune) |
| Prosody | style tokens, audio prompt (Voicebox) | SSML prosody/phoneme |
| Segmentation | duration predictor | SSML break, max length |
| Content | LLM upstream (referral to LLMs M2) | pronunciation lexicon |
In production: the two columns coexist — SSML for precision (announcements, accessibility), latents for naturalness (conversation).
9. Voice conversion and cloning: ethics and watermarking
The same models that give an assistant a pleasant voice can give anyone’s voice to a fraudster from a few seconds of recording. This chapter explains how conversion and cloning work, what the law and the engineer must do about them, and how generated audio is watermarked.
Definition 9.1 — Conversion, adaptation, zero-shot cloning Voice conversion: re-emit what a source voice says with the timbre of a target voice (content preserved, speaker changed).
Zero-shot cloning: synthesize any text in a given voice from an audio prompt of a few seconds (VALL-E, Voicebox: conditioning by reference, ch. 7).
Technically: a speaker embedding (learned by speaker verification — the GE2E loss of Wan et al., 2018, aligns the embeddings of the same voice); YourTTS (ICML 2022) adds it to VITS (the TTS of ch. 7 becomes multi-speaker in one training).
VALL-E (Microsoft, 2023) treats cloning as language: AR over the EnCodec acoustic tokens (ch. 11), the 3 s prompt serving as prefix — TTS is absorbed by the LLM paradigm.
Theorem 9.2 — Ethics: the law follows (slowly), the engineer decides (fast) Cloning from 3 s of reference makes possible: voice fraud (calls to the “boss”), audio disinformation, impersonation.
Frameworks: Regulation (EU) 2024/1689 (AI Act, art. 50) imposes transparency — systems generating or manipulating image/voice must mark their outputs machine-readably; in France, the voice is protected as an attribute of personality (civil case law on imitation).
For the engineer, the operational answer is technical: consent (voice datasets under a clear license — lab 2 uses only authorized voices), marking (watermarking, below), detection (provenance: cf. Explainability module ch. 9 for text, the logic is identical).
For a student project that records voices: written consent of each speaker for a stated purpose, recordings kept only for the project and deleted at its end, and no clone of anyone who has not agreed. A voiceprint used to identify a person is biometric data under the GDPR (art. 9).
The exam question: “why is TTS watermarking easier than text watermarking?” — because the output space is continuous and the channel capacity is immense (ch. 6): one can hide bits without perceptible loss… but the channel degrades under compressions.
Theorem 9.3 — Audio watermarking: from spread spectrum to networks
Classical: spread-spectrum watermarking — add a low-energy pseudo-random noise (key k), masked by the psychoacoustic threshold effect, in a time-frequency domain (STFT and random signals: Signal Processing ch. 6-7); detection by correlation with the key.
The detector is a hypothesis test with the structure of the green-list text watermark of LLMs Theorem 9.3, whose score is z = (s_G - \gamma T)/\sqrt{T\gamma(1-\gamma)} for s_G green tokens among T: a pseudo-random key, a test, a strength/quality trade-off.
In audio, let the key be k_i = \pm 1 on n chosen coefficients, let the host coefficients c_i have zero mean and standard deviation \sigma, and let the marked ones be y_i = c_i + a\, k_i. The score is z = \frac{1}{\sigma \sqrt n} \sum_{i=1}^{n} y_i\, k_i .
Without a mark, the key is independent of the host and z is close to \mathcal N(0, 1). With one, its mean is (a/\sigma)\sqrt n: detection power grows like \sqrt n times the mark-to-host ratio, as the text score grows like \sqrt T.
Neural: WavMark (2023) hides ~32 bits per second of speech with a learned encoder/detector, robust to re-encodings.
AudioSeal (Meta, ICML 2024) adds localization: a sample-level detector indicates which segments are synthetic (adversarial generator/detector, perceptual loss).
Marking during generation (in-generation) applies the watermark in the TTS itself — inseparable from the output.
Evaluation protocol: ROC curves detection rate / false positives, under attack (mp3, re-voicing, reverberation) — the robustness budget of text watermarks (Control in Generative AI ch. 10, optional), word for word.
Example 9.4 — Voice fraud in 3 steps (and its 3 countermeasures)
- 3 s of public voice \to zero-shot cloning;
- urgency script generated by an LLM (referral to LLMs M2);
- vishing call.
Countermeasures:
- channel: automatic call-back on a known number (the most robust control is organizational);
- challenge posed by the interlocutor (off-script question — conversational TTS answer these better and better, cf. ch. 10);
- provenance: watermark verified at reception if both phones support it.
Moral of the module: no single layer suffices — defense in depth.
10. The conversational loop: VAD, turn-taking, full-duplex
Recognition and synthesis are not yet a conversation: the system must also know when the user has finished, answer within a human delay, and cope with interruptions. This chapter measures the human speaking turn and shows how systems went from a pipeline with thresholds to full-duplex models.
Theorem 10.1 — The human speaking turn, in numbers Human conversation alternates turns with a median delay on the order of 200 ms — measured across ten languages (Stivers et al., PNAS 2009); yet planning and pronouncing the first word of a turn takes ~600 ms: humans anticipate the end of the other’s turn (prosodic, syntactic, pragmatic cues) to prepare their own.
An assistant that listens to everything, waits for silence, transcribes, thinks, synthesizes, shows ~1.5-3 s of latency — five to ten times too slow: turn-taking is the real conversational bottleneck, not intelligence.
Reference framework: the survey by Skantze (Computer Speech & Language, 2021): transition-relevance points (TRP), end-of-turn prediction (end-of-turn: classifier on a sliding window — VAD + prosody + syntax), backchannels (“hmm”, audible nods: listening without taking the turn).
Proposition 10.2 — Pipeline: endpointing as control Deciding “the user is done” is an error/latency trade-off: cutting too early = interruptions (the assistant speaks over — the most badly perceived error), cutting too late = dead silences.
Parameters: silence threshold \tau_s (typically 300-700 ms), depth of context (rising prosody? incomplete syntax?), and policy (letting long hesitations speak).
Formalization: a sequential test — detect the “end of turn” regime change as early as possible under a false-positive constraint; the same fidelity/cost curve as streaming ASR (ch. 5), this time at the dialogue level.
Modern implementation: the end-of-turn predictor becomes a small multi-modal model (audio + partial text) that replaces hand-tuned thresholds.
Theorem 10.3 — Full-duplex: dGSLM then Moshi (the 2023-2024 leap)
dGSLM (Nguyen et al., TACL 2023): the first entirely vocal dialogue model — two streams of HuBERT tokens (discretized speech, ch. 11) run in parallel; the model learns by itself alternation and overlaps (simultaneous laughs): proof of concept that turn-taking is learnable without text.
Moshi (Défossez et al., Kyutai, 2024): the first real-time full-duplex voice assistant. Three pieces:
- the neural codec Mimi (descendant of EnCodec, ch. 11) tokenizes audio at low rate (~12.5 frames/s) into two streams: semantic and acoustic;
- the multi-stream architecture: the tokens of Moshi (the model’s voice) and of the user are predicted in parallel, not in alternation — the model can cut itself off or fall silent during an interruption;
- the inner monologue: each audio token of the model is aligned with its corresponding text token — the text guides, the audio realizes; theoretical latency 160 ms and about 200 ms in practice (the human target of thm. 10.1), dialogue memory via the transformer context.
The module’s loop is closed: VAD, endpointing, ASR-LLM-TTS pipeline disappear into a single generative model — the next topic.
What full-duplex changes in practice
- Interruptions: handled natively (the user stream continues to be predicted while Moshi speaks — the model “hears itself” speak);
- Backchannels: emergent, unscripted;
- The voice of machines: unique and marked vocal identity (AI Act transparency obligations, ch. 9);
- the risk: human latency makes the machine socially indistinguishable — watermarking (ch. 9) becomes the only frontier.
To be debated in session: should a 200 ms assistant announce itself?
11. Speech LLMs and multilingualism
The last step removes the boundary between speech and text models: if audio can be cut into discrete tokens, a language model can read and write it directly. This chapter shows how audio is tokenized, the three ways of grafting audio onto an LLM, and what this changes for the thousands of languages with little data.
Definition 11.1 — Tokenizing audio: neural codecs and RVQ A neural codec (EnCodec: Défossez et al., 2022) compresses speech with a convolutional auto-encoder constrained by a residual vector quantization (RVQ): the continuous latent is approximated by a sum of vectors from successive codebooks — each frame (at 24 kHz: one frame \approx 320 samples, ~75 Hz) becomes a stack of ~2-32 discrete indices.
Result: speech becomes a text of tokens — consumable by a transformer.
The hierarchy of AudioLM (Borsos et al., 2023) orders the tokens: first semantic (k-means units of the self-supervised w2v-BERT model, which capture the content), then coarse then fine acoustic (the first and the last RVQ levels of a SoundStream codec, EnCodec’s predecessor: timbre, environment). Generating in this order guarantees the content before the texture.
Moshi’s codec Mimi (ch. 10) puts the same split inside one codec: a first, semantic codebook distilled from a self-supervised model, then acoustic RVQ levels. dGSLM (ch. 10) keeps only the semantic level — HuBERT units, turned back into sound by a unit vocoder.
Theorem 11.2 — Speech LLMs: three audio grafts onto an LLM
Audio-in: the speech encoder (Whisper, HuBERT) is projected into the LLM’s space by an adapter (SALMONN, and all multimodal assistants 2025+) — the model listens (implicit transcription, paralinguistics: emotion, speaker) and answers in text; it is the “audio-in” family of ch. 8 of the LLMs module (M2), same machinery as vision;
Audio-out: the LLM generates acoustic tokens (VALL-E: AR over EnCodec with a voice prompt; AudioLM units at the output); the cloning of ch. 9 becomes a skill of the language model;
Audio-in-out (speech-to-speech): SpeechGPT (2023) adds discrete HuBERT units to the LLM’s vocabulary and both reads and writes them, turn by turn; Moshi (ch. 10) does it in full duplex, the text being the inner monologue guiding the audio tokens in both directions — the LLM is the pipeline.
SpeechT5 (2022) had laid down the first unified text/speech architecture (T5 encoder-decoder + shared codebook); 2024-2026 generalize: one model, all the module’s tasks (ASR, TTS, speech translation, editing, voice to voice).
Proposition 11.3 — Multilingualism: 7,000 languages, 100 covered The bottleneck of low-resource languages: labeling is expensive, writing is sometimes lacking.
MMS (Meta, 2023 — “Scaling Speech Technology to 1000+ Languages”): one multilingual wav2vec 2 model fine-tuned with CTC, with small per-language adapters, covers ASR in 1,107 languages; TTS uses a separate VITS model per language for the same languages; language identification covers 4,017. All are learned mainly on public religious readings (the paradox: the Bible is the most translated text in the world) — a jump by a factor of 10-40 in coverage.
Common Voice (Mozilla): open crowd-sourcing (including French — regional accents: lab 1 draws from it).
The specificities of French return (ch. 4, ex. 4.3): number normalization (the date sub-test: “en 1996”), acronyms, loanwords.
For the engineer: zero-shot (Whisper/MMS) first, light adaptation next (LoRA on the encoder — LLMs 4.3; versioned adapters in production: ML Ops ch. 7), targeted data last; and measure per language — a multilingual “average” WER masks local collapses.
Conclusion of the module — the fusion of the three worlds Signal (M1), language (LLMs M2), conversation (this module): speech is no longer an interface in front of language, it becomes one of its dialects — discrete tokens like any others, generatable, guidable, controllable.
The hard/soft taxonomy of ch. 8 (refined in the Control in Generative AI module, ch. 2) now applies word for word: hard constraints = SSML and prosody grammars; guidance = style tokens and cloning by prompt; watermarking = voice provenance (ch. 9); evaluation = WER/MOS/latency and trade-off curves.
Wherever you set foot in 2026 — research or product — the final question is the same: what must be controlled, and at what price?
Exercises / Labs
★ Lab: Whisper transcription and WER (the module’s ASR lab). With
transformers:load
openai/whisper-tinyas an ASR pipeline, transcribe two French excerpts from Common Voice (one read, one spontaneous);implement the WER (word-level Levenshtein alignment: S + D + I against the reference);
compare tiny/small;
pre-filter with Silero VAD (cut the silences) and measure the effect on the hallucinations of (a);
redo on English to situate French.
Proof. Guidance (expected results): tiny is 2-3× faster but clearly more fragile; the spontaneous French WER is 1.5-3× read English; the VAD massively reduces the hallucinated loops on silences (Whisper “invents” text without energy — prop. 4.2 experienced); beware of normalizations (capitalization, punctuation: normalize before aligning, otherwise the WER is artifactual). ∎
★ Lab: TTS with transformers (the synthesis lab).
synthesize a French text with MMS-TTS (
facebook/mms-tts-fra, a single-speaker VITS), and an English one with SpeechT5 (microsoft/speecht5_tts, English only; vocodermicrosoft/speecht5_hifigan; a speaker x-vector from CMU ARCTIC);measure the RTF (computation time / audio duration) and the first-sample latency of both;
try three trap sentences on MMS-TTS: “1 234 567 €”, “le SARS-CoV-2”, “à Saint-Étienne, il est 19 h58” — record the normalization failures;
inject a different speaker x-vector into SpeechT5 and compare (MMS-TTS has no speaker input);
break the Mel contract of ch. 6: copy-synthesize a real 16 kHz recording through the SpeechT5 vocoder, its Mel computed by the SpeechT5 feature extractor (80 bins, 16 ms hop), then again from a 22.05 kHz file left unresampled, or with the hop changed to 10 ms.
Proof. Guidance: RTF < 1 on GPU, on the order of 1-3 on CPU for SpeechT5, which generates its Mel autoregressively, and much lower for the parallel VITS of MMS-TTS; numbers and acronyms fail reproducibly — discuss neural vs rule-based front-end (def. 8.3); the x-vector shifts the timbre but not the accent: perfect zero-shot cloning does not exist with a single vector (ch. 9: one needs the sequential prompt, VALL-E style); in (e) the vocoder still outputs a voice, but slowed, shifted or buzzy — the Mel parameters are an interface, not a detail. ∎
★ CTC by hand. Take up example 2.2 (T = 4, y = \texttt{ab}) with, for t = 1..4, p_t(\epsilon) = 0.5, \qquad p_t(a) = 0.3, \qquad p_t(b) = 0.2 . Compute the 15 products, sum them, check that the sum equals the \alpha_4(5) + \alpha_4(4) obtained by the recursions of Theorem 2.3 (fill in the \alpha table row by row).
Proof. Guidance: the \alpha table has 4 rows \times 5 columns (with structural zeros — one cannot reach \ell_4 before t=2). Its last row and the result are (0.0625, 0.0816, 0.171, 0.0864, 0.06), \qquad p(y \mid x) = 0.0864 + 0.06 = 0.1464, the sum of the 15 products.
Six paths tie as the most probable (two blanks, one a, one b: 0.5^2 \times 0.3 \times 0.2 = 0.015 each), whereas the frame-by-frame argmax is \epsilon\epsilon\epsilon\epsilon, which collapses to the empty string — the best path is not the best labelling.
Check that the bound T \geq |y| (here 2) is necessary and explain the jump condition \mathbf 1\{\ell_s \neq \ell_{s-2}\} on a counter-example “aa”. ∎
★★ CTC in code, gradient verified. Implement \alpha, \beta (thm. 2.3) in NumPy for a mini-vocabulary; compute \partial \mathcal L/\partial p_t(k) by the closed formula; check against automatic differentiation (autograd/PyTorch of the sum of paths) to within \varepsilon = 10^{-6}.
Proof. Guidance: the convention (\beta with or without the p_t factor) is the classic error — the autograd check detects it immediately; measured complexity \mathcal O(T S) versus enumeration (15 paths here; enumeration explodes beyond T \approx 15); conclude on the differentiation of the full model’s objective (softmax + recursions) — this is exactly what PyTorch does, vectorized. ∎
★★ Latency budget of a voice assistant. A pipeline: VAD (30 ms window) \to chunking ASR (640 ms chunk, 160 ms lookahead) \to LLM (time-to-first-token 250 ms) \to TTS (first Mel chunk 120 ms + vocoder 20 ms).
compute the first-sound latency of the response (component-by-component detail);
identify the two dominant terms and propose three reductions;
compare with Moshi’s full-duplex (160 ms theoretical, about 200 ms in practice): what does it remove?
Proof. Guidance:
sum the delays after the user’s last word:
- VAD 30 ms;
- endpointing — absent from the list but unavoidable — a silence threshold of 300-500 ms;
- ASR chunking: the last word is transcribed only once its 640 ms chunk and the 160 ms lookahead have been heard, i.e. on average half a chunk plus the lookahead (320 + 160 = 480 ms) and up to 800 ms;
- LLM 250 ms;
- TTS 120 + 20 = 140 ms.
Total, of which endpointing and chunking make about two thirds: \approx 30 + 400 + 480 + 250 + 140 \approx 1.3 \text{ s on average (up to } \approx 1.7 \text{ s)};
this serial sum is an upper estimate: when the endpointer and the streaming ASR read the same audio in parallel, their two waits overlap and the LLM starts at the later of the two (about 0.54 s on average), for a total near 0.9 s;
reduce the threshold by end-of-turn prediction (prop. 10.2), ASR with a smaller chunk, speculative LLM (referral to LLMs M2 ch. 6);
Moshi removes VAD/endpointing (continuous stream prediction), ASR/TTS (native audio tokens) and the LLM queue: what remains is network time + one model step. ∎
★★ Audio watermarking: ROC under attack (bonus). Synthesize 20 sentences (lab 2); mark half of them with a public audio watermark (e.g. AudioSeal); plot the detector’s ROC (true positive / false positive) on: clean audio, mp3 re-encoding at 64 kbps, light noise addition; conclude on the end-to-end provenance channel (ch. 9).
Proof. Guidance: the clean curve is nearly perfect (AUC > 0.99); mp3 degrades moderately (the watermark survives usual compressions — it is designed for that); strong additive noise attacks harder; relate to the z-score of Theorem 9.3: marking strength \uparrow = imperceptibility \downarrow — the same triple trade-off as in text (Control in Generative AI ch. 10, optional). ∎
★★ Lab: the WER(\lambda) curve of a streaming ASR. Simulate a chunked encoder (Theorem 5.2, item 1) with the CTC model
facebook/wav2vec2-base-960h, whose output frames are 20 ms apart, on the first 200 utterances of LibriSpeech test-clean.cut each utterance into chunks of L frames; run the encoder on 2 s of left context, the chunk and R frames of lookahead, and keep the chunk’s logits only;
concatenate the kept logits, decode greedily (prop. 2.4), and compute the WER for L \in \{8, 16, 32, 64\} and R \in \{0, 4, 8, 16\};
plot WER against \lambda = (L + R)\,\Delta with \Delta = 20 ms, next to the offline WER, and pick the elbow (Proposition 5.3);
measure the RTF of each setting.
Proof. Guidance: collapse after concatenation, not chunk by chunk, or a letter whose frames straddle a border is emitted twice. Expect the WER to be far above the offline value at R = 0 and small L, where the frames at chunk borders see no future, then to fall quickly as the lookahead grows to a few hundred ms, then to plateau near the offline WER. A model trained with the same chunk masks (Theorem 5.2) loses less at small \lambda than this offline one. The RTF grows as L shrinks, since the context is recomputed for every chunk. ∎
★★ Lab: per-language WER, Whisper against MMS. On the FLEURS test sets (Conneau et al., IEEE SLT 2022: the same read sentences in 102 languages) of French, English, Swahili, Yoruba and one language of your choice:
transcribe 100 utterances per language with
openai/whisper-smalland withfacebook/mms-1b-all, after loading its adapter for the language;normalize both references and hypotheses (case, punctuation, digits), then compute WER and character error rate (CER) per language;
report the mean over languages next to the per-language values, and find the language where the two systems differ most (Proposition 11.3).
Proof. Guidance: expect Whisper to lead on English and French and MMS on the low-resource languages, where Whisper can exceed 50% WER or answer in the wrong language (force the language token). The mean hides these collapses: report per-language values and confidence intervals over utterances. CER is steadier than WER where word segmentation is uncertain. Normalization choices move WER by several points: state them (Example 4.3). ∎
Projects and assessment
The official assessment of this course is not displayed: its course description is not published, and the LLGA 2 – Semestre 3 and Semestre 4 tracks of the 2026–2027 SynapseS catalog list no courses yet, so no modality, weight or ECTS value is known. The subjects below are proposals of these notes, not official rules: a project can stand for continuous assessment, and the exam proposal for a final written exam if one is announced.
The projects exercise mainly O6 (the audio modality end to end: recognition, synthesis, dialogue), O2 (CTC as a marginal likelihood, flows, diffusion and flow-matching TTS), O7 (latency budgets and deployment on real data) and O8 (consent, watermarking, disaggregated evaluation), with O3 wherever an LLM joins the loop. Every subject that records voices follows the consent rule of ch. 9: written consent, recordings deleted at the end of the project, no clone of anyone who has not agreed.
Solo projects
- [Solo · ≈ 20 h] Paper study: CTC, from the forward-backward to forced alignment (Graves, Fernández, Gomez and Schmidhuber, 2006). Does your own forward-backward give the library’s loss and gradient, and how precise are the word boundaries it yields?
- Work: \alpha and \beta in log space (Theorem 2.3) in NumPy, checked against
torch.nn.functional.ctc_lossand autograd (Ex. 4); Viterbi forced alignment over the extended label sequence, on the emissions offacebook/wav2vec2-base-960h; prefix beam search with shallow fusion of the official LibriSpeech 4-gram language model (OpenSLR resource 11). - Data: LibriSpeech test-clean (Panayotov et al., 2015); reference word timings from the Montreal Forced Aligner (McAuliffe et al., 2017).
- Success criterion: loss and gradient within 10^{-6} (relative) of the library; median word-start deviation under 50 ms from the reference timings, with its distribution; a lower WER for beam search with the LM than for greedy decoding.
- Deliverables: code, a 4–6 page report, a 10-minute talk; chapters 1 and 2, Ex. 3–4.
- Work: \alpha and \beta in log space (Theorem 2.3) in NumPy, checked against
- [Solo · ≈ 20 h] The latency/quality curve of streaming ASR, with asynchronous correction. Where is the elbow of WER(\lambda), and how much of the gap to the offline WER does a second pass recover?
- Work: Ex. 7 extended to 5–8 values of L and of R, on test-clean and test-other, with bootstrap intervals over utterances; then each endpointed segment re-transcribed by Whisper (Theorem 5.2, item 3), measuring the WER recovered and the delay of the correction.
- Data: LibriSpeech test-clean and test-other; a noisy copy mixed with MUSAN noise (Snyder, Chen and Povey, 2015) at 10 dB SNR.
- Success criterion: WER(\lambda) curves with confidence bands and a justified elbow; the share of the streaming-to-offline gap recovered by the second pass, with its median delay.
- Deliverables: code, report, talk; chapters 3–5, Ex. 7. It is the streaming block of the Y2.3 project.
- [Solo · ≈ 20 h] Paper study: diffusion against flow matching for the Mel decoder (Popov et al., 2021; Mehta, Tu, Beskow, Székely and Henter, 2024). How many sampling steps does each family need for the same quality?
- Work: first, both objectives of Theorem 7.3 on a 2-D toy distribution; then the released LJSpeech checkpoints of Grad-TTS and of Matcha-TTS (a conditional-flow-matching decoder), with a HiFi-GAN vocoder trained on LJSpeech, swept over 1, 2, 4, 10 and 50 steps.
- Data: LJSpeech (Ito and Johnson, 2017), 100 held-out sentences.
- Success criterion: per step count, the RTF, the WER of Whisper on the synthesized speech (intelligibility) and the UTMOS predicted MOS (Saeki et al., 2022), with intervals; the step count where each curve flattens.
- Deliverables: code, report, talk with audio samples; chapters 6 and 7.
Group projects
- [Group of 3 · ≈ 30 h each] A low-latency voice assistant with barge-in. Can a cascade of open models answer a spoken question within the turn-taking budget of ch. 10, and stop talking when it is interrupted?
- Work: microphone → Silero VAD → streaming faster-whisper → a small instruction-tuned LLM with retrieval over a document set (served by vLLM or llama.cpp) → Piper (VITS) TTS, every stage traced; a sweep of the endpointing threshold \tau_s (Proposition 10.2); barge-in, where the user’s voice stops the TTS; a qualitative comparison with the public Moshi demo.
- Data: 60 spoken questions recorded by consenting members in quiet and noisy rooms, plus TTS renders mixed with MUSAN noise; the course pages as the retrieval corpus.
- Split: speech front end and endpointing; LLM, retrieval and serving; TTS, barge-in and the evaluation harness.
- Success criterion: P50 and P95 time to first audio against the budget of Ex. 5 (target: P95 at most 1.5 s); the false cut-in rate as a function of \tau_s; the TTS stopped within 300 ms of a barge-in.
- Deliverables: code and a live demo, an 8–10 page joint report, a 20-minute talk; chapters 4, 5, 7 and 10. It connects to LLMs ch. 8 and to the serving SLOs of MLOps ch. 3, and rehearses the Y2.3 project.
- [Group of 3 · ≈ 30 h each] A provenance audit of voice cloning, with consented voices only. Does an audio watermark survive the attacks a fraudster would use, and does a spoof detector catch what it misses?
- Work: zero-shot cloning of the members’ own voices with YourTTS; marking with AudioSeal and WavMark; attacks by mp3 at 64 kbps, white noise at 20 dB SNR, speed change of ±5 %, and re-recording through a loudspeaker and a phone; ROC and AUC per attack (Theorem 9.3, Ex. 6).
- Detection: speaker similarity with an ECAPA-TDNN verifier (Desplanques, Thienpondt and Demuynck, 2020); a spoof countermeasure trained on ASVspoof 2019 LA (Wang et al., 2020).
- Split: consent protocol and cloning; watermarking and attacks; verification, spoof detection and a one-page note on AI Act art. 50.
- Success criterion: true-positive rate at 1 % false positives per attack, with bootstrap intervals, set against the figures reported for AudioSeal (San Roman et al., 2024); the spoof detector’s equal error rate on the clones.
- Deliverables: code, joint report, talk; chapters 6 and 9. The correlation detector rests on Signal Processing ch. 7; the attack budget connects to Security and Robustness ch. 10 and Explainability, Security and Privacy of LLMs ch. 9.
- [Group of 2 · ≈ 30 h each] French accents and a low-resource language: disaggregated WER, then LoRA. Which speakers does a multilingual recognizer fail, and does a light adaptation help them without hurting the others?
- Work: Whisper (two sizes) and MMS on Common Voice French grouped by its self-reported accent field, and on one low-resource language of FLEURS; a stated text normalization (numbers, liaison spellings, Example 4.3); LoRA on the Whisper encoder (LLMs 4.3), trained on the train split of the weakest groups.
- Data: Common Voice French (Ardila et al., 2020) and FLEURS (Conneau et al., 2022), official splits.
- Split: benchmarking and normalization; adaptation and regression tests.
- Success criterion: per-group WER with intervals before and after adaptation; no group losing more than one WER point.
- Deliverables: code, joint report, talk; chapters 4 and 11, Ex. 1 and 8.
Written exam (proposal)
Two hours, one handwritten A4 sheet allowed, a simple calculator allowed; four exercises of 5 points. It would stand for a final written exam, if the course announces one.
- Question (5 points). Compare CTC, LAS, RNN-T and Whisper on three axes: how the alignment is handled, whether the model has an internal language model, and whether it can stream. Then say where a causal RNN-T gets its right context from.
- Expected: CTC marginalizes monotone alignments of conditionally independent frames, has no internal LM and streams with a causal encoder. LAS learns the alignment by attention, has an autoregressive decoder (an internal LM), and cannot stream strictly since it reads all of x first.
- RNN-T sums over a T \times U lattice, its prediction network is a partial internal LM, and it streams with a causal encoder. Whisper generates text and timestamps as tokens over 30 s windows: no native streaming.
- A causal RNN-T has no acoustic right context: its prediction network only adds left context over the emitted tokens. Accuracy is bought back with a few lookahead frames, paid in latency \lambda = (L + R)\,\Delta.
- Question (5 points). CTC on T = 3 frames for the one-letter label y = \texttt{a}, with at every frame p_t(\epsilon) = 0.6, \qquad p_t(\texttt{a}) = 0.4 . List the paths that collapse to \texttt{a} and sum their probabilities; fill the \alpha table of Theorem 2.3 and check; give the loss and its derivative with respect to p_2(\texttt{a}); compare with greedy decoding.
- Expected: \ell = (\epsilon, \texttt{a}, \epsilon) and six paths, writing
-for \epsilon —aaa(0.064),aa-and-aa(0.096 each),a--,-a-and--a(0.144 each) — so p(y \mid x) = 0.688. - Rows of \alpha: (0.6, 0.4, 0), (0.36, 0.4, 0.24), (0.216, 0.304, 0.384), and \alpha_3(3) + \alpha_3(2) = 0.688.
- The loss is -\ln 0.688 \approx 0.374. With \beta_2(2) = 1, the derivative of p(y \mid x) is \alpha_2(2)\beta_2(2)/p_2(\texttt{a}) = 1, so the loss derivative is -1/0.688 \approx -1.45.
- Greedy decoding picks \epsilon at every frame and outputs the empty string, whose probability is 0.216 < 0.688: the best path is not the best labelling.
- Expected: \ell = (\epsilon, \texttt{a}, \epsilon) and six paths, writing
- Question (5 points). Let f be the affine coupling layer of Definition 7.2b. Prove that f is invertible with an explicit inverse and that its log-determinant is \sum_j s_j(z_a). Deduce \log p_Z(z) when u = f(z) \sim \mathcal N(0, I_d), and say why VITS takes s = 0.
- Expected: z_a = y_a, then z_b = (y_b - m(y_a)) \odot \exp(-s(y_a)); no network is inverted.
- The Jacobian is block lower-triangular, with diagonal blocks I and \mathrm{diag}(e^{s(z_a)}), so its determinant is \prod_j e^{s_j(z_a)}.
- By the change of variables: \log p_Z(z) = -\tfrac12 \|f(z)\|^2 - \tfrac d2 \log 2\pi + \sum_j s_j(z_a).
- With s = 0 the layer preserves volume: the log-determinant vanishes, training is simpler and stabler, expressiveness comes from the shifts and the stacking, and the density stays exact.
- Question (5 points). A chunked streaming encoder with frame step \Delta = 10 ms gives, on a fixed test set, these WERs for the chunk and lookahead sizes (L, R) in frames: (16, 0) 14.0 %; (16, 4) 10.5 %; (16, 8) 9.6 %; (32, 8) 9.1 %; (64, 16) 8.8 %; offline 8.5 %. Give \lambda for each setting, choose the best one under a 300 ms budget, locate the elbow, and explain what an asynchronous second pass changes.
- Expected: \lambda = 160, 200, 240, 400 and 800 ms (Definition 5.1).
- Under 300 ms, (16, 8) at 240 ms with 9.6 %. The elbow is near 200–240 ms: the WER drops 4.4 points from 160 to 240 ms, then only 0.8 point for 560 ms more.
- A second pass shows the streaming text at once and replaces it, a few hundred ms after each endpoint, by an offline transcription (Theorem 5.2, item 3): the final WER approaches 8.5 % while the reactivity stays that of the first pass, at the price of extra compute and text that corrects itself.
Grading rubric (proposal)
| Criterion | Weight | What earns the marks |
|---|---|---|
| Question and protocol | 20 % | the question stated before the experiment; fixed test sets and held-out data; seeds or bootstrap intervals; normalization rules written down |
| Correct implementation | 25 % | code written from the chapters (CTC recursions, latency accounting, TTS objectives) and checked against a reference library or a hand computation, with a stated tolerance |
| Measurement of quality and latency | 20 % | WER or CER per condition and per group, RTF, P50/P95 latencies broken down by stage; no single average hiding a collapse |
| Analysis tied to the theory | 20 % | each result, failures included, explained by a statement of the course (alignment, lookahead, step count, watermark z-score) |
| Ethics and communication | 15 % | consent and deletion of recordings documented, no unconsented clone; figures that answer the question, audio samples, a talk on time, honest limits |
References
- Signal and representations: L. Rabiner, B.-H. Juang, Fundamentals of Speech Recognition, Prentice Hall, 1993; L. Rabiner, A Tutorial on Hidden Markov Models and Selected Applications in Speech Recognition, Proc. IEEE 77(2), 1989; S. Davis, P. Mermelstein, Comparison of Parametric Representations… (MFCC), IEEE TASSP, 1980 — foundations in the Signal Processing (M1) module ch. 4-8.
- End-to-end ASR: A. Graves, S. Fernández, F. Gomez, J. Schmidhuber, Connectionist Temporal Classification: Labelling Unsegmented Sequence Data with Recurrent Neural Networks, ICML 2006; A. Graves, Sequence Transduction with Recurrent Neural Networks (RNN-T), 2012; W. Chan et al., Listen, Attend and Spell, ICASSP 2016; A. Gulati et al., Conformer: Convolution-augmented Transformer for Speech Recognition, Interspeech 2020; N. Moritz, T. Hori, J. Le Roux, Streaming Automatic Speech Recognition with the Transformer Model, ICASSP 2020.
- Self-supervised representations and data at scale: A. Baevski et al., wav2vec 2.0, NeurIPS 2020; W.-N. Hsu et al., HuBERT, IEEE/ACM TASLP 2021; A. Radford et al., Robust Speech Recognition via Large-Scale Weak Supervision (Whisper), ICML 2023; V. Pratap et al., Scaling Speech Technology to 1000+ Languages (MMS), 2023; Mozilla Common Voice; V. Panayotov et al., LibriSpeech: an ASR Corpus Based on Public Domain Audio Books, ICASSP 2015; A. Conneau et al., FLEURS, IEEE SLT 2022.
- TTS and vocoders: A. van den Oord et al., WaveNet: A Generative Model for Raw Audio, 2016; J. Shen et al., Natural TTS Synthesis by Conditioning WaveNet on Mel Spectrogram Predictions (Tacotron 2), ICASSP 2018; J. Kong et al., HiFi-GAN, NeurIPS 2020; J. Kim et al., Conditional Variational Autoencoder with Adversarial Learning for End-to-End Text-to-Speech (VITS), ICML 2021; V. Popov et al., Grad-TTS, ICML 2021; S. Mehta, R. Tu, J. Beskow, É. Székely, G. E. Henter, Matcha-TTS: A Fast TTS Architecture with Conditional Flow Matching, ICASSP 2024; M. Le et al., Voicebox: Text-Guided Multilingual Universal Speech Generation at Scale, 2023; Y. Wang et al., Style Tokens: Unsupervised Style Modeling, Control and Transfer in End-to-End Speech Synthesis, ICML 2018; L. Dinh, J. Sohl-Dickstein, S. Bengio, Density Estimation Using Real NVP (affine coupling), ICLR 2017; Y. Lipman et al., Flow Matching for Generative Modeling, ICLR 2023; W3C, Speech Synthesis Markup Language (SSML) 1.1.
- Cloning, ethics, watermarking: E. Casanova et al., YourTTS, ICML 2022; C. Wang et al., Neural Codec Language Models are Zero-Shot Text to Speech Synthesizers (VALL-E), 2023; L. Wan et al., Generalized End-to-End Loss for Speaker Verification, ICASSP 2018; G. Chen et al., WavMark: Watermarking for Audio Generation, 2023; R. San Roman et al., Proactive Detection of Voice Cloning with Localized Watermarking (AudioSeal), ICML 2024; Regulation (EU) 2024/1689 — AI Act (art. 50) — the text watermark and its z-test in LLMs ch. 9.5 (J. Kirchenbauer et al., ICML 2023); extended by the Explainability module ch. 9 and, on the Graph × LLM route, the Control in Generative AI module ch. 6 and 10.
- Conversation and speech LLMs: G. Skantze, Turn-taking in Conversational Systems and Human-Robot Interaction: A Review, Computer Speech & Language 67, 2021; T. Stivers et al., Universals and Cultural Variation in Turn-Taking, PNAS 2009; T. Nguyen et al., Generative Spoken Dialogue Language Modeling (dGSLM), TACL 2023; Z. Borsos et al., AudioLM: A Language Modeling Approach to Audio Generation, IEEE/ACM TASLP 2023; Y.-A. Chung et al., w2v-BERT, ASRU 2021; N. Zeghidour et al., SoundStream: An End-to-End Neural Audio Codec, IEEE/ACM TASLP 2022; A. Défossez et al., High Fidelity Neural Audio Compression (EnCodec), 2022; A. Défossez et al., Moshi: a Speech-Text Foundation Model for Real-Time Dialogue, 2024 (code); J. Ao et al., SpeechT5: Unified-Modal Encoder-Decoder for Speech Language Processing, ACL 2022; D. Zhang et al., SpeechGPT: Empowering Large Language Models with Intrinsic Cross-Modal Conversational Abilities, Findings of EMNLP 2023; C. Tang et al., SALMONN: Towards Generic Hearing Abilities for Large Language Models, ICLR 2024 — the multimodal layer is in the LLMs (M2) module ch. 8.
- Lab tools: HuggingFace transformers (ASR/TTS pipelines); Silero VAD; jiwer (WER); AudioSeal.