Edit model card

Model Card for Model ID

Model Details

Model Description

This is a quantized model of the original version mohammed/whisper-small-arabic-cv-11

  • Developed by: Mohammed Bakheet
  • Funded by [optional]: Kalam Technology
  • Language(s) (NLP): Arabic, English

Uses

This a quantized model that reads arabic voice and transcribes/translate it into english

Direct Use

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')

Out-of-Scope Use

The model does a direct translation of Arabic speech, and doesn't do a direct transcription, we are still working on that.

Recommendations

Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.

How to Get Started with the Model

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')

Training Data

Please refer to the original model at "mohammed/whisper-small-arabic-cv-11"

Training Procedure

Please refer to the original model at "mohammed/whisper-small-arabic-cv-11"

Preprocessing [optional]

Please refer to the original model at "mohammed/whisper-small-arabic-cv-11"

Training Hyperparameters

  • Training regime: Please refer to the original model at "mohammed/whisper-small-arabic-cv-11"
Downloads last month
8
Inference Examples
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social visibility and check back later, or deploy to Inference Endpoints (dedicated) instead.