IPA Phoneme Studio
Loading rights-cleared starter clipβ¦
Click the waveform or any phoneme token below to seek audio playback.
Recognised IPA phoneme stream
Aligned phoneme timeline (click to play & inspect)
See inside β 20 ms CTC frame posteriors
Every ~20 ms frame emits a probability distribution over all 392 IPA tokens
(ID 0 = <pad> blank + 388 eSpeak phones). Greedy CTC collapses consecutive
duplicate IDs and drops blanks. Click any frame bar or phoneme tile to inspect competing
phonetic hypotheses and frame entropy (bits).
Run transcription to inspect the 20 ms frame-by-frame CTC emission strip.
Select a phoneme tile or click a frame bar to inspect top-3 posterior candidates.
At a glance
| Upstream model | facebook/wav2vec2-xlsr-53-espeak-cv-ft (24-layer XLSR-53 fine-tuned on multilingual Common Voice eSpeak IPA) |
|---|---|
| Browser ONNX build | air-air/xlsr-53-espeak-student-ONNX (8-layer distilled student β 76.81 MB vs 241 MB full model, ~3Γ faster) |
| Task & loader path |
automatic-speech-recognition Β· loaded via
AutoFeatureExtractor + AutoModelForCTC + vocab.json
(because Wav2Vec2PhonemeCTCTokenizer is absent in Transformers.js 3.7.5)
|
| Architecture |
Wav2Vec2ForCTC: 7-layer CNN encoder (320Γ downsampling = 20 ms/frame at 16 kHz)
+ 8 transformer layers (hidden_size=1024, 16 heads) + 392-symbol IPA CTC head
|
| Quantisation & size | q4 (4-bit block-32 matmuls, 8-bit convs) Β· onnx/model_q4.onnx + configs = 76.81 MB decimal (73.25 MiB) |
| Backend & runtime | WebAssembly (wasm) via shared @huggingface/transformers@3.7.5 in a dedicated Web Worker |
| License | Apache-2.0 (both upstream teacher and distilled ONNX student) |
| Honest limitations | Distilled on 88 h of FLEURS (de, es, fr, it, ja, ko, pl, pt, ru, sv); matches the 24-layer teacher on 67% of non-blank frames. Outputs acoustic IPA without a lexicon or language model, so heavy noise or unseen accents can shift vowel qualities. |
Why audio-to-IPA in the browser matters
Standard ASR models like Whisper silently autocorrect mispronunciations into valid dictionary words β making them blind to how someone actually spoke. An acoustic CTC phoneme recogniser listens directly to sounds and emits timestamped IPA symbols locally with zero audio uploaded.
- Language-learning & pronunciation feedback β compare observed spoken IPA against canonical G2P IPA (see Multi-model).
- Field linguistics & phonetics β generate instant Praat
.TextGridinterval tiers for under-resourced or mixed-language recordings (see Practical). - Speech therapy & clinical privacy β inspect consonant substitutions and frame posteriors on-device without transmitting patient audio.
Use-case ladder
Basics: CTC Collapse & Confidence
Adjust confidence thresholds and duplicate-merge rules live on cached 20 ms logits, and audit the articulatory inventory.
Practical: Batch Praat TextGrid Queue
Process multiple recordings FIFO with Pause/Resume/Cancel and export Praat .TextGrid, OWASP-safe CSV, and JSON.
Wild: Acoustic Perturbation Lab
Stress-test phone stability under 12 dB noise, telephone low-pass, -18 dB gain, 1.25Γ speed, and silence padding with live PER %.
Multi-model: Live Pronunciation Scorer
Chain XLSR-53 Phoneme (audio β IPA) with CharsiuG2P byT5 (text β canonical IPA) for exact Levenshtein phoneme diff scoring.
How the API works
Because Wav2Vec2PhonemeCTCTokenizer is not built into Transformers.js 3.7.5, we load
AutoFeatureExtractor and AutoModelForCTC directly, fetch the 392-entry
vocab.json into transformers-cache, and run greedy CTC decoding in
worker.js.
Show the code β worker.js: AutoFeatureExtractor + AutoModelForCTC + cached vocab.json
Show the code β phoneme-core.mjs: decodeCtcLogits() (argmax, softmax entropy, repeat collapse)
References
- Upstream teacher β facebook/wav2vec2-xlsr-53-espeak-cv-ft (Apache-2.0)
- Distilled ONNX student β air-air/xlsr-53-espeak-student-ONNX (Apache-2.0, 76.81 MB q4)
- Paper β Simple and Effective Zero-shot Cross-lingual Phoneme Recognition (Xu, Baevski, Auli, 2021)
- CTC β Connectionist Temporal Classification (Graves et al., 2006)
- Audio provenance ledger (JFK 1961 inaugural excerpt, public domain)