🗣️ Speech Synthesis Lab: Vocal Tract Formants, Pitch and Spectrogram

2D interactive simulation · educational model
The science

Source-filter model. Voiced speech is a buzz from the vocal folds (a harmonic series at the pitch f0, falling roughly 12 dB per octave) filtered by the resonances of the throat, mouth and nose. The resonances are the formants F1, F2, F3. Their positions, not the pitch, make an /a/ different from an /i/: F1 follows how open the jaw is, F2 how far forward the tongue is.

Tube model. For a uniform tube closed at the glottis and open at the lips (length L, speed of sound c ≈ 350 m/s in warm moist air) the resonances are Fn = (2n − 1) c / (4L). For L = 17.5 cm that gives 500, 1500, 2500 Hz — the neutral vowel /ə/. A shorter tract (women, children) scales all formants up by roughly 17.5/L; the voice sliders use this.

What this synthesizer does. A band-limited sawtooth (Web Audio oscillator) is low-pass filtered, split into three parallel second-order band-pass resonators at F1-F3 (bandwidth about 90-130 Hz each), and mixed; fricatives and plosive bursts are shaped noise; formants glide between sounds over about 25 ms. Vowel targets are the average male values of Peterson & Barney (1952), (checked 2026-11-19 against the table reproduced at cs.princeton.edu/courses/archive/spr99/cs325/formants.html, from P. R. Cook, Music, Cognition and Computerized Sound, MIT Press 1999) (F1/F2/F3 in Hz: /i/ 270/2290/3010, /ɑ/ 730/1090/2440, /u/ 300/870/2240).

Honest simplifications. The text-to-sound rules are a toy: each letter or digraph maps to one sound with a few spelling rules (silent e, ee, oo, sh, th ...), so many English words will sound wrong. There is no stress, intonation beyond a gentle fall, nasal anti-resonance, or voice-quality modelling. Real systems (including your browser's voice, offered for comparison) use pronunciation dictionaries and neural or concatenative models. This is a teaching instrument for how speech sounds are built, not a usable TTS engine.