French keyword-spotting model for vrc-WiredExpressions: wav2vec2 CTC with two heads on one encoder, one over letters and one over phonemes, 20 ms frames, 16 transformer layers, int8 ONNX (254 MB).
| File | Content |
|---|---|
model.onnx |
Input input_values: float32 [batch, samples], 16 kHz mono, zero mean, unit variance. Outputs logits: [batch, frames, 59] (letters) and phoneme_logits: [batch, frames, 60] (phonemes). int8 dynamic quantization of the MatMuls. |
enc.onnx |
model.onnx after its convolutional feature encoder: input /wav2vec2/Transpose_output_0: float32 [batch, frames, 512], the output of fx.onnx in vrc-we-voice-en; outputs logits and phoneme_logits. enc.onnx(fx.onnx(x)) equals model.onnx(x) exactly. |
vocab.json |
Letter token ids; <pad> (0) is the CTC blank, ` |
phonemes.json |
Phoneme token ids: <pad> (0) is the CTC blank, ` |
config.json |
Wav2Vec2Config of the pruned network. |
voice.json |
Language, units, firing threshold (-0.75), and fusion: how the two heads decide a phrase together. |
lexicon.tsv |
Word pronunciations for the phoneme head, 150,707 words: one line per word, tab-separated: the word (lowercase), its phonemes, space-separated, in the symbols of phonemes.json. CharsiuG2P's pronunciation of every word heard at least twice in the training transcripts. |
pron.tsv |
Pronunciation table, 30,000 words: one line per word, tab-separated: the word (lowercase), its sound (CharsiuG2P IPA without stress, syllable or linking marks, g as ɡ, ɫ as l), and the other spellings of that sound, space-separated (may be empty). |
fx.onnx and enc.onnx are model.onnx cut in two at the end of the convolutional feature encoder, which fine-tuning left frozen, so every vrc-we-voice model shares it: a client listening in several languages runs it once per audio window instead of once per language. model.onnx stays for clients that load the whole network.
The letter head spells what it hears; the phoneme head writes the sounds. A phrase is registered as its spelling and, through lexicon.tsv, as its pronunciation; vrc-WiredExpressions scores both every frame and decides them together (voice.json, fusion):
A phrase with a word the lexicon lacks, and a phrase shorter than five letters, is decided by the letter head alone. The phoneme head is one linear layer on the same encoder: the model costs what a letter model costs.
pron.tsv lets a phrase be heard by its sound, not only its spelling. It lists the 30,000 most frequent words of the Common Voice 19.0 and Multilingual Spoken Words Corpus transcripts this model was trained on. Each word's sound comes from CharsiuG2P; its spellings (43,093 in all) from a character transformer (3 + 3 layers, width 256) trained on this table from sound to spelling, with the evaluation word sets left out, beam 8, every spelling within 2 nats of the best but the word itself.
vrc-WiredExpressions registers, for a phrase of one word, the table's words with the same sound and the word's own spellings, under the phrase's text; a word the table lacks takes its sound from the int8 CharsiuG2P in vrc-we-voice-en and gets the table's words with that sound. One occurrence fires the phrase once, whichever spelling heard it.
| Local word sets, clean | Without the table | With it |
|---|---|---|
| Homophones heard as another group member, % | 21 | 55 |
| Spelling variants heard as another group member, % | 31 | 54 |
| False fires per phrase-hour on the word sets | 1.21 | 3.49 |
Sentences and words (the previous version's evaluation): 88.8 / 90.4 → 83.5 / 88.8 at the two strictest budgets, 0.00 → 0.06 false fires per phrase-hour at the threshold.
The previous version of this model was fine-tuned from jonatasgrosman/wav2vec2-large-xlsr-53-french (Apache 2.0), pruned to its lower 16 of 24 layers, with CTC on letters (training log below). This one continues it in two stages of 10,000 steps each on the data below. A phoneme head is added in the first and trained with the encoder and the letter head.
| Dataset | Licence | Utterances |
|---|---|---|
| Common Voice 19.0 | CC0 1.0 | 567,576 |
| Multilingual Spoken Words Corpus | CC BY 4.0 | 1,535,229 |
| FLEURS, train split | CC BY 4.0 | 2,508 |
| Multilingual LibriSpeech | CC BY 4.0 | 258,212 |
| VoxPopuli, transcribed | CC0 1.0 | 28,281 |
Phoneme labels: each transcript's words through lexicon.tsv, the pronunciations of CharsiuG2P (MIT; trained on WikiPron's Wiktionary pronunciations, CC BY-SA) as vrc-WiredExpressions converts them, | between words; 2,260,167 utterances have one, the rest train the letter head alone.
Noise and rooms: MUSAN (CC BY 4.0); the FSD50K development set (CC BY 4.0, Fonseca, Favory, Pons, Font and Serra) without its speech-labelled clips, each clip licensed CC0 1.0 or CC BY 3.0 by its Freesound uploader and credited in FSD50K's metadata (32,626 clips; the NC and Sampling+ clips left out); the simulated room impulse responses of RIRS_NOISES (Apache 2.0, Ko, Peddinti, Povey, Seltzer and Khudanpur) and its point-source noises, public-domain Freesound recordings from MUSAN.
Augmentation, both stages: noise in half the utterances at 5 to 20 dB SNR; a simulated room in 20%; 5% non-speech items with empty targets. Multilingual Spoken Words clips are drawn at 0.2 of their share. Stage 2 adds: speed 0.88 to 1.12 (pitch and formants move with it) in 30%; a random low-pass (2.5 to 7 kHz) or high-pass (100 to 500 Hz) in 20%; driven 1.5 to 8 times past full scale and clipped in 10%; masks over about 15% of the frames and 5% of the feature channels; and 15% of the items trained as vrc-WiredExpressions decodes, CTC over the frames each 3 s window keeps at a hop of 0.3, 0.6 or 1.2 s.
Local tests, not a standard benchmark. Phrases are registered as text and spotted in continuous audio through vrc-WiredExpressions at its Balanced hop, both models int8, each at its own thresholds; this model's are fitted to fire on no more impostor phrases than the previous version does at its own.
| Previous version | This model | |
|---|---|---|
| Phrases heard, of 1,722 | 68.5% | 71.8% |
| Impostor phrases fired | 176 | 176 |
| False fires on 1.26 h of music, noise and vocal sounds, every phrase registered | 7 | 5 |
Hits per condition at a 0.5% false-fire budget, the cut fitted on each stream alone: this model minus the previous version, in points, with the 95% interval of a paired bootstrap (bold where it excludes zero).
| Condition | Sentences | Words | Short phrases |
|---|---|---|---|
| Clean | +4.5 [+1.4, +8.1] | −0.5 [−4.0, +2.7] | 0.0 [−6.6, +6.6] |
| Quiet | −0.1 [−2.7, +2.7] | ||
| Noise, 10 dB SNR | +3.2 [−0.5, +7.1] | −0.6 [−6.0, +4.7] | −1.1 [−9.4, +6.6] |
| Noise, 0 dB SNR | +1.5 [−4.7, +8.0] | ||
| Babble, five voices | +8.2 [+2.0, +14.7] | ||
| Reverberation | +12.8 [+5.0, +20.7] | ||
| Narrowband channel | +4.1 [+1.3, +7.7] | ||
| Clipped | +1.6 [0.0, +4.0] |
Streams: FLEURS test sentences, each with an impostor bank of near-miss phrases, isolated Multilingual Spoken Words test clips from speakers held out of training, short phrases, clean and through simulated conditions.
Shared settings: batches of 40 s of audio, 2 accumulated per step; AdamW, 10% warm-up, linear decay; all layers and the head trained; utterances 0.5 to 15 s; MUSAN noise in half the utterances at 5 to 20 dB SNR, and 5% noise-only samples with an empty target.
A continuation was kept when its hit rate, averaged over five false-fire budgets (0.05 to 1 per phrase-hour) and the speech tests, rose by at least one point in total, no test fell by more than one, and non-speech false fires stayed at or under 0.1 per phrase-hour.
| Stage | Outcome |
|---|---|
| Pruned to 16 layers, 12,000 steps, 3e-5 | kept: the previous version |
| Continuation, 6,000 steps, 1.5e-5 | rejected: net −7.8 |
| Two heads: a phoneme head added; 10,000 steps, 3e-5, 80 s batches; FSD50K, rooms and non-speech items added | kept |
| Stage 2: speed, filters, clipping, masks and window-matched CTC added; 10,000 steps, 3e-5 (head 1e-4) | kept: this model |
This version was kept because no benchmark budget or stream scored significantly worse than the previous version at a matched false-fire budget and the non-speech streams fired no more often (Evaluation).
model.onnx, enc.onnx, vocab.json, phonemes.json, config.json and voice.json: Apache 2.0, as the base models. Dataset licences are listed above.
pron.tsv: CC BY 4.0. Its words come from Common Voice 19.0 (CC0 1.0) and the Multilingual Spoken Words Corpus (CC BY 4.0); its sounds from CharsiuG2P (MIT, Zhu, Zhang and Jurgens 2022) through klebster's ONNX export (CC BY 4.0). CharsiuG2P was trained on WikiPron's Wiktionary pronunciations (CC BY-SA).
lexicon.tsv: CC BY 4.0. Its words come from this model's training transcripts (licences above); its pronunciations from CharsiuG2P (MIT, Zhu, Zhang and Jurgens 2022; trained on WikiPron's Wiktionary pronunciations, CC BY-SA) through klebster's ONNX export (CC BY 4.0).
model.onnx 254 MBenc.onnx 237 MBjonatasgrosman/wav2vec2-large-xlsr-53-french