Downloads · 30 days
7
32% of all-time downloads
mohammed/quantized-whisper-small
quantized-whisper-small is a automatic speech recognition model from mohammed. Use it when you need speech turned into text. It is set up for transformers.
This is a quantized model of the original version mohammed/whisper-small-arabic-cv-11
Downloads · 30 days
7
32% of all-time downloads
All-time downloads
22
Public
Repo size
473 MB
Likes
0
Public
Click a slice to open those files.
.onnx473 MB · 99%
From the Hugging Face model README
This is a quantized model of the original version mohammed/whisper-small-arabic-cv-11
This a quantized model that reads arabic voice and transcribes/translate it into english
First, install the following packages using the following commands:
pip install -U optimum[exporters,onnxruntime] transformers pip install huggingface_hub
# uncomment the following installation if you are using a notebook:
#!pip install -U optimum[exporters,onnxruntime] transformers
#!pip install huggingface_hub
# import the required packages
from optimum.onnxruntime import ORTModelForSpeechSeq2Seq
from transformers import WhisperTokenizerFast, WhisperFeatureExtractor, pipeline
# set model name/id
model_name = 'mohammed/quantized-whisper-small' # folder name
model = ORTModelForSpeechSeq2Seq.from_pretrained(model_name, export=False)
tokenizer = WhisperTokenizerFast.from_pretrained(model_name)
feature_extractor = WhisperFeatureExtractor.from_pretrained(model_name)
forced_decoder_ids = tokenizer.get_decoder_prompt_ids(language="ar", task="transcribe")
pipe = pipeline('automatic-speech-recognition',
model=model,
tokenizer=tokenizer,
feature_extractor=feature_extractor,
model_kwargs={"forced_decoder_ids": forced_decoder_ids})
# the file to be transcribed
pipe('Recording.mp3')
The model does a direct translation of Arabic speech, and doesn't do a direct transcription, we are still working on that.
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
Use the code below to get started with the model.
First, install the following packages using the following commands:
pip install -U optimum[exporters,onnxruntime] transformers
pip install huggingface_hub
from optimum.onnxruntime import ORTModelForSpeechSeq2Seq
from transformers import WhisperTokenizerFast, WhisperFeatureExtractor, pipeline
model_name = 'mohammed/quantized-whisper-small' # folder name
model = ORTModelForSpeechSeq2Seq.from_pretrained(model_name, export=False)
tokenizer = WhisperTokenizerFast.from_pretrained(model_name)
feature_extractor = WhisperFeatureExtractor.from_pretrained(model_name)
forced_decoder_ids = tokenizer.get_decoder_prompt_ids(language="ar", task="transcribe")
pipe = pipeline('automatic-speech-recognition',
model=model,
tokenizer=tokenizer,
feature_extractor=feature_extractor,
model_kwargs={"forced_decoder_ids": forced_decoder_ids})
# the file to be transcribed
pipe('Recording.mp3')
Please refer to the original model at "mohammed/whisper-small-arabic-cv-11"
Please refer to the original model at "mohammed/whisper-small-arabic-cv-11"
Please refer to the original model at "mohammed/whisper-small-arabic-cv-11"