robg's picture
ONNX q8 export of vitouphy/wav2vec2-xls-r-300m-timit-phoneme
ad0f63c verified
|
Raw
History Blame Contribute Delete
1.38 kB
metadata
language: en
library_name: transformers.js
pipeline_tag: automatic-speech-recognition
license: apache-2.0
base_model: vitouphy/wav2vec2-xls-r-300m-timit-phoneme
tags:
  - phoneme-recognition
  - pronunciation
  - onnx

Speako Phoneme Recognizer

ONNX export of vitouphy/wav2vec2-xls-r-300m-timit-phoneme (Apache-2.0) for in-browser phoneme recognition with Transformers.js. Used by Speako for pronunciation feedback: recognized IPA phonemes are aligned against CMUdict reference pronunciations to score each word.

  • onnx/model_quantized.onnx (~355 MB): INT8 dynamic quantization of MatMul ops only — quantized Conv layers crash onnxruntime, so the convolutional feature extractor stays fp32.
  • tokenizer.json is synthesized from vocab.json (the source repo ships only a slow CTC tokenizer, which Transformers.js cannot load).
  • Output: IPA phonemes from a 39-symbol TIMIT-derived inventory, words separated by spaces. Run on CPU/WASM.
import { pipeline } from '@huggingface/transformers';
const asr = await pipeline('automatic-speech-recognition', 'robg/speako-phoneme-recognizer', {
  dtype: 'q8',
  device: 'wasm',
});
const { text } = await asr(float32Audio16kHz); // "ɪn ʤɛnɝəl tɛknɑləʤi ..."