accent-id (browser files)
The files that the accent-id demo downloads and runs in the visitor's browser. The demo guesses a speaker's native language from about 30 seconds of English speech. No audio is sent anywhere. Everything runs in the browser with ONNX Runtime Web.
Code (MIT): github.com/alfonsostg/accent-id. The export script is
web/export.py.
| File | What it is |
|---|---|
wavlm_l6_pooled.onnx |
microsoft/wavlm-base-plus cut after transformer layer 6, with mean and standard-deviation pooling over time. fp32, unchanged weights. Input: 16 kHz mono waveform (1, n). Output: a 1,536-value vector. |
silero_vad.onnx |
Silero VAD, the ONNX build shipped with the silero-vad Python package (MIT). |
refdb.bin |
The 2,134 reference recordings of the Speech Accent Archive as z-scored, L2-normalised vectors (float32, row-major, 2,134 ร 1,536). |
refdb.json |
Scaler, kNN heads, labels, speaker metadata, thresholds and front-end settings. |
Checks. In fp32, the ONNX encoder matches the PyTorch model on real speech, with a largest absolute difference of 1e-6. Fed the same 16 kHz audio, the browser pipeline reproduces the Python pipeline's speech segments, vectors and scores, with probabilities within 1e-6.
Accuracy. Speaker-disjoint 5-fold cross-validation over the 29 native languages with at least 15 speakers puts the correct language first for 61% of speakers (always guessing English: 36%). This is a research prototype.
Licences. The reference vectors and metadata derive from the Speech Accent Archive (Weinberger, S. 2013, George Mason University, accent.gmu.edu), licensed CC BY-NC-SA 4.0. This repository inherits that licence: non-commercial use, with attribution, under the same terms. The encoder weights come from microsoft/wavlm-base-plus. Its model card states no licence, and the microsoft/unilm repository that released WavLM is MIT-licensed. Silero VAD is MIT-licensed.