File size: 3,715 Bytes
eea19f5 716bc38 eea19f5 716bc38 eea19f5 35a5932 eea19f5 eeda588 716bc38 e14fb0d 716bc38 eea19f5 e14fb0d 716bc38 eea19f5 716bc38 eea19f5 716bc38 eea19f5 716bc38 eea19f5 716bc38 eea19f5 35a5932 eeda588 35a5932 eea19f5 35a5932 eea19f5 35a5932 eea19f5 35a5932 eea19f5 35a5932 eea19f5 35a5932 eea19f5 35a5932 eea19f5 35a5932 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 |
---
library_name: transformers
tags: []
---
# Model Card for Model ID
<!-- Provide a quick summary of what the model is/does. -->
## 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
```python
# 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
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
The model does a direct translation of Arabic speech, and doesn't do a direct transcription, we are still working on that.
### Recommendations
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
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.
```python
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"
|