Automatic Speech Recognition
Transformers.js
ONNX
English
wav2vec2
phoneme-recognition
pronunciation
Instructions to use robg/speako-phoneme-recognizer with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers.js
How to use robg/speako-phoneme-recognizer with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('automatic-speech-recognition', 'robg/speako-phoneme-recognizer');
| 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](https://huggingface.co/vitouphy/wav2vec2-xls-r-300m-timit-phoneme) (Apache-2.0) for in-browser phoneme recognition with [Transformers.js](https://huggingface.co/docs/transformers.js). Used by [Speako](https://speako.tre.systems/) 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. | |
| ```js | |
| 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 ..." | |
| ``` | |