https://huggingface.co/openai/whisper-tiny with ONNX weights to be compatible with Transformers.js.
If you haven't already, you can install the Transformers.js JavaScript library from NPM using:
npm i @huggingface/transformers
Example: Transcribe audio from a URL.
import { pipeline } from '@huggingface/transformers';
const transcriber = await pipeline('automatic-speech-recognition', 'Xenova/whisper-tiny');
const url = 'https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/jfk.wav';
const output = await transcriber(url);
Note: Having a separate repo for ONNX weights is intended to be a temporary solution until WebML gains more traction. If you would like to make your models web-ready, we recommend converting to ONNX using 🤗 Optimum and structuring your repo like this one (with ONNX weights located in a subfolder named onnx).
onnx/decoder_model_merged.onnx 119 MBonnx/decoder_model.onnx 118 MBonnx/decoder_with_past_model.onnx 114 MBonnx/decoder_model_uint8.onnx 110 MBonnx/decoder_model_int8.onnx 110 MBonnx/decoder_with_past_model_uint8.onnx 109 MBonnx/decoder_with_past_model_int8.onnx 109 MBonnx/decoder_model_merged_q4.onnx 87 MBonnx/decoder_model_q4.onnx 87 MBonnx/decoder_model_merged_bnb4.onnx 86 MBonnx/decoder_model_bnb4.onnx 86 MBonnx/decoder_with_past_model_q4.onnx 86 MBonnx/decoder_with_past_model_bnb4.onnx 85 MBonnx/decoder_model_merged_fp16.onnx 60 MBonnx/decoder_model_fp16.onnx 59 MBonnx/decoder_with_past_model_fp16.onnx 57 MBonnx/decoder_model_merged_q4f16.onnx 46 MBonnx/decoder_model_q4f16.onnx 46 MBonnx/decoder_with_past_model_q4f16.onnx 45 MBonnx/encoder_model.onnx 33 MBonnx/decoder_model_merged_uint8.onnx 31 MBonnx/decoder_model_merged_int8.onnx 31 MBonnx/decoder_model_merged_quantized.onnx 31 MBonnx/decoder_model_quantized.onnx 30 MBonnx/decoder_with_past_model_quantized.onnx 29 MBonnx/encoder_model_fp16.onnx 17 MBonnx/encoder_model_quantized.onnx 10 MBonnx/encoder_model_uint8.onnx 10 MBonnx/encoder_model_q4.onnx 9 MBonnx/encoder_model_bnb4.onnx 9 MBonnx/encoder_model_q4f16.onnx 6 MBopenai/whisper-tiny