Update README.md
Browse files
README.md
CHANGED
@@ -13,17 +13,11 @@ tags: []
|
|
13 |
|
14 |
### Model Description
|
15 |
|
16 |
-
|
17 |
|
18 |
-
|
19 |
-
|
20 |
-
- **
|
21 |
-
- **Funded by [optional]:** [More Information Needed]
|
22 |
-
- **Shared by [optional]:** [More Information Needed]
|
23 |
-
- **Model type:** [More Information Needed]
|
24 |
-
- **Language(s) (NLP):** [More Information Needed]
|
25 |
-
- **License:** [More Information Needed]
|
26 |
-
- **Finetuned from model [optional]:** [More Information Needed]
|
27 |
|
28 |
### Model Sources [optional]
|
29 |
|
@@ -35,31 +29,36 @@ This is the model card of a 🤗 transformers model that has been pushed on the
|
|
35 |
|
36 |
## Uses
|
37 |
|
38 |
-
|
39 |
|
40 |
### Direct Use
|
41 |
|
42 |
-
|
|
|
|
|
43 |
|
44 |
-
|
|
|
|
|
|
|
|
|
45 |
|
46 |
-
|
|
|
|
|
|
|
|
|
47 |
|
48 |
-
|
|
|
49 |
|
50 |
-
|
51 |
|
52 |
### Out-of-Scope Use
|
53 |
|
54 |
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
|
55 |
|
56 |
-
|
57 |
-
|
58 |
-
## Bias, Risks, and Limitations
|
59 |
-
|
60 |
-
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
|
61 |
-
|
62 |
-
[More Information Needed]
|
63 |
|
64 |
### Recommendations
|
65 |
|
|
|
13 |
|
14 |
### Model Description
|
15 |
|
16 |
+
This is a quantized model of the original version mohammed/whisper-small-arabic-cv-11
|
17 |
|
18 |
+
- **Developed by:** Mohammed Bakheet
|
19 |
+
- **Funded by [optional]:** Kalam Technology
|
20 |
+
- **Language(s) (NLP):** Arabic, English
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
|
22 |
### Model Sources [optional]
|
23 |
|
|
|
29 |
|
30 |
## Uses
|
31 |
|
32 |
+
This a quantized model that read arabic voice and transcribes/translate it into english
|
33 |
|
34 |
### Direct Use
|
35 |
|
36 |
+
```python
|
37 |
+
from optimum.onnxruntime import ORTModelForSpeechSeq2Seq
|
38 |
+
from transformers import WhisperTokenizerFast, WhisperFeatureExtractor, pipeline
|
39 |
|
40 |
+
model_name = 'mohammed/quantized-whisper-small' # folder name
|
41 |
+
model = ORTModelForSpeechSeq2Seq.from_pretrained(model_name, export=False)
|
42 |
+
tokenizer = WhisperTokenizerFast.from_pretrained(model_name)
|
43 |
+
feature_extractor = WhisperFeatureExtractor.from_pretrained(model_name)
|
44 |
+
forced_decoder_ids = tokenizer.get_decoder_prompt_ids(language="ar", task="transcribe")
|
45 |
|
46 |
+
pipe = pipeline('automatic-speech-recognition',
|
47 |
+
model=model,
|
48 |
+
tokenizer=tokenizer,
|
49 |
+
feature_extractor=feature_extractor,
|
50 |
+
model_kwargs={"forced_decoder_ids": forced_decoder_ids})
|
51 |
|
52 |
+
# the file to be transcribed
|
53 |
+
pipe('Recording.mp3')
|
54 |
|
55 |
+
```
|
56 |
|
57 |
### Out-of-Scope Use
|
58 |
|
59 |
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
|
60 |
|
61 |
+
The model does a direct translation of Arabic speech, and doesn't do a direct transcription, we are still working on that.
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
|
63 |
### Recommendations
|
64 |
|