Downloads · 30 days
30
3% of all-time downloads
mohammed/whisper-small-arabic-cv-11
whisper-small-arabic-cv-11 is a automatic speech recognition model from mohammed. Use it when you need speech turned into text. It is set up for transformers. The card lists the license as apache-2.0.
should probably proofread and complete it, then remove this comment. --
Downloads · 30 days
30
3% of all-time downloads
All-time downloads
1.2K
Public
Parameters
242M
967 MB on disk
Likes
2
Public
Click a slice to open those files.
.safetensors967 MB · 100%
From the Hugging Face model README
نموذج كلام الصغير للتعرف على الصوت، هذا النموذج يتميز بدقة عالية في التعرف على الصوت باللغة العربية
This model is a fine-tuned version of openai/whisper-small on the Common Voice 11.0 dataset. It achieves the following results on the evaluation set:
This model is a fine-tuned version of openai/whisper-small on the Common Voice 11.0 dataset. It achieves 20.32 WER. Data augmentation can be implemented to further improve the model performance.
from datasets import load_dataset
from transformers import WhisperProcessor, WhisperForConditionalGeneration
from datasets import Audio
# load the dataset
test_dataset = load_dataset("mozilla-foundation/common_voice_11_0", "ar", split="test", use_auth_token=True, trust_remote_code=True)
# get the processor and model from mohammed/whisper-small-arabic-cv-11
processor = WhisperProcessor.from_pretrained("mohammed/whisper-small-arabic-cv-11")
model = WhisperForConditionalGeneration.from_pretrained("mohammed/whisper-small-arabic-cv-11")
model.config.forced_decoder_ids = None
# resample the audio files to 16000
test_dataset = test_dataset.cast_column("audio", Audio(sampling_rate=16000))
# get 10 exmaples of model transcription
for i in range(10):
sample = test_dataset[i]["audio"]
input_features = processor(sample["array"], sampling_rate=sample["sampling_rate"], return_tensors="pt").input_features
predicted_ids = model.generate(input_features)
transcription = processor.batch_decode(predicted_ids, skip_special_tokens=False)
transcription = processor.batch_decode(predicted_ids, skip_special_tokens=True)
print(f"{i} Reference Sentence: {test_dataset[i]['sentence']}")
print(f"{i} Predicted Sentence: {transcription[0]}")
The output is:
0 Reference Sentence: زارني في أوائل الشهر بدري
0 Predicted Sentence: زارني في أوائل الشهر بدري
1 Reference Sentence: إبنك بطل.
1 Predicted Sentence: ابنك بطل
2 Reference Sentence: الواعظ الأمرد هذا الذي
2 Predicted Sentence: الوعز الأمرد هذا الذي
3 Reference Sentence: سمح له هذا بالتخصص في البرونز الصغير، الذي يتم إنتاجه بشكل رئيسي ومربح للتصدير.
3 Predicted Sentence: صمح له هازب التخزوس في البرونز الصغير الذي زيت معنى به بشكل رئيسي من غربح للتصدير
4 Reference Sentence: ألديك قلم ؟
4 Predicted Sentence: ألديك قلم
5 Reference Sentence: يا نديمي قسم بي الى الصهباء
5 Predicted Sentence: يا نديمي قد سنبي إلى الصحباء
6 Reference Sentence: إنك تكبر المشكلة.
6 Predicted Sentence: إنك تكبر المشكلة
7 Reference Sentence: يرغب أن يلتقي بك.
7 Predicted Sentence: يرغب أن يلتقي بك
8 Reference Sentence: إنهم لا يعرفون لماذا حتى.
8 Predicted Sentence: إنهم لا يعرفون لماذا حبت
9 Reference Sentence: سيسعدني مساعدتك أي وقت تحب.
9 Predicted Sentence: سيسعد لمساعدتك أي وقت تحب
This model is trained on the Common Voice 11.0 dataset.
The model is trained on 64 cores CPU, Nvidia 4070 Ti with 24 GB VRAM, and 100GB Disk space. The GPU utilization reached 100%. Please check the training hyperparameters below.
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss | Wer |
|---|---|---|---|---|
| 0.721 | 0.2079 | 250 | 0.3651 | 29.8761 |
| 0.3044 | 0.4158 | 500 | 0.3308 | 27.6497 |
| 0.262 | 0.6237 | 750 | 0.3085 | 25.2769 |
| 0.2396 | 0.8316 | 1000 | 0.2863 | 24.5298 |
| 0.1998 | 1.0394 | 1250 | 0.2743 | 23.2776 |
| 0.134 | 1.2473 | 1500 | 0.2749 | 22.9829 |
| 0.1328 | 1.4552 | 1750 | 0.2662 | 22.3315 |
| 0.1314 | 1.6631 | 2000 | 0.2643 | 21.7402 |
| 0.1262 | 1.8710 | 2250 | 0.2598 | 21.8566 |
| 0.101 | 2.0789 | 2500 | 0.2608 | 21.4248 |
| 0.0653 | 2.2868 | 2750 | 0.2682 | 20.9912 |
| 0.062 | 2.4947 | 3000 | 0.2638 | 21.0137 |
| 0.0627 | 2.7026 | 3250 | 0.2636 | 20.5369 |
| 0.0603 | 2.9105 | 3500 | 0.2602 | 20.4580 |
| 0.0456 | 3.1183 | 3750 | 0.2748 | 20.9555 |
| 0.0324 | 3.3262 | 4000 | 0.2702 | 20.4918 |
| 0.0318 | 3.5341 | 4250 | 0.2739 | 20.4355 |
| 0.0296 | 3.7420 | 4500 | 0.2735 | 20.4374 |
| 0.0291 | 3.9499 | 4750 | 0.2725 | 20.3717 |
| 0.022 | 4.1578 | 5000 | 0.2758 | 20.3229 |