加载中…
加载中…
A small multilingual phoneme recogniser for the browser. It's facebook/wav2vec2-xlsr-53-espeak-cv-ft cut from 24 transformer layers to 8, then trained to hear what the full model hears. It's a 77 MB download, against 241 MB for the full model at the same precision, and about three times faster.
On held-out FLEURS dev audio, the student's likeliest phone matches the full model's on 67% of the frames where the full model hears a phone (the blank aside).
It knows what the full model knows. That model wasn't fine-tuned on Japanese or Korean, so both come out in the phones of other languages, and the student copies that. It was trained and checked on read speech.
The vocabulary is the full model's: 392 espeak phones, with <pad> (id 0) as the CTC blank.
import { AutoFeatureExtractor, AutoModelForCTC } from '@huggingface/transformers';
const id = 'air-air/xlsr-53-espeak-student-ONNX';
const extractor = await AutoFeatureExtractor.from_pretrained(id);
const model = await AutoModelForCTC.from_pretrained(id, { dtype: 'q4' });
const { logits } = await model(await extractor(audio)); // audio: Float32Array, 16 kHz mono
Apache License 2.0, as the source model is released (see LICENSE). FLEURS is CC BY 4.0
(Conneau et al., 2022).