Real-time vowel formant analyzer that visualizes your speech on an IPA vowel chart. Runs entirely in the browser — no server, no dependencies.
- Records audio from your microphone using the Web Audio API
- Extracts F1 and F2 formant frequencies in real-time using Linear Predictive Coding (LPC)
- Plots your current vowel position on a standard IPA vowel chart
- Shows the formant trajectory as a fading trace, so you can see how vowels shift over time
Open index.html in a browser (or visit the GitHub Pages link above), click Start, and speak. The green dot tracks your vowel position in real-time. Say sustained vowels like "eeee", "aaaa", "oooo" to see the dot move across the chart.
Click Clear Trace to reset the trajectory path.
No build step needed. Just serve the files:
# Python
python -m http.server 8000
# Node
npx serve .Then open http://localhost:8000. A local server is required because the app uses ES modules.
Mic input → Pre-emphasis → Hamming window → Autocorrelation → Levinson-Durbin → LPC coefficients → Root finding → Formant frequencies
- Pre-emphasis — High-pass filter (
y[n] = x[n] - 0.97·x[n-1]) to boost higher frequencies and flatten the spectral tilt of speech - Windowing — Hamming window applied to each ~23ms frame to reduce spectral leakage
- LPC analysis — Autocorrelation method with Levinson-Durbin recursion computes a 12th-order all-pole model of the vocal tract transfer function
- Root finding — Durand-Kerner iterative method finds roots of the LPC polynomial
- Formant selection — Roots are converted to frequencies; those with positive frequency, magnitude < 1 (stable), and bandwidth < 400 Hz are kept as formant candidates
The chart plots F2 (horizontal, reversed) against F1 (vertical), matching the standard IPA vowel trapezoid layout. Reference positions are based on average adult male formant values from Peterson & Barney (1952).
The trajectory fades over ~8 seconds using alpha decay, showing recent vowel movement as a gradient trail. This is similar to a Praat formant track but mapped onto the 2D vowel space.
| File | Description |
|---|---|
index.html |
Main page |
style.css |
Dark theme styles |
app.js |
Audio capture, UI updates, chart rendering |
lpc.js |
LPC formant extraction algorithm |
vowels.js |
IPA vowel reference data (F1/F2 mappings) |
Requires a modern browser with Web Audio API and getUserMedia support (Chrome, Firefox, Edge, Safari 14.1+).
MIT