Automatic Speech Recognition
Transformers
Safetensors
Arabic
whisper
arabic
dialectal-arabic
asr
Eval Results (legacy)
Instructions to use oddadmix/whisper-medium-arabic-dialectal with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use oddadmix/whisper-medium-arabic-dialectal with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("automatic-speech-recognition", model="oddadmix/whisper-medium-arabic-dialectal")# Load model directly from transformers import AutoProcessor, AutoModelForSpeechSeq2Seq processor = AutoProcessor.from_pretrained("oddadmix/whisper-medium-arabic-dialectal") model = AutoModelForSpeechSeq2Seq.from_pretrained("oddadmix/whisper-medium-arabic-dialectal", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -97,6 +97,24 @@ Fine-tuned on [`oddadmix/dialectal-arabic-lahgtna-v2-smaller-augmented`](https:/
|
|
| 97 |
(fp32 weights + generate)
|
| 98 |
- **Metric**: WER/CER on cleaned references (clean-text normalized)
|
| 99 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 100 |
## Usage
|
| 101 |
```python
|
| 102 |
import torch, torchaudio
|
|
|
|
| 97 |
(fp32 weights + generate)
|
| 98 |
- **Metric**: WER/CER on cleaned references (clean-text normalized)
|
| 99 |
|
| 100 |
+
## Fine-tuning (reproduce)
|
| 101 |
+
|
| 102 |
+
The exact fine-tuning code is bundled in this repo (`train.py`, `normalize.py`, `evaluate_model.py`) plus `requirements.txt`. Trained on `oddadmix/dialectal-arabic-lahgtna-v2-smaller-augmented` (**private**) — swap in any HF audio dataset with `audio` + `text` columns. `normalize.py` is the shared text cleaning (strip tashkil + non-verbal tags, keep dialectal letters گ ڨ چ).
|
| 103 |
+
|
| 104 |
+
```bash
|
| 105 |
+
pip install -r requirements.txt
|
| 106 |
+
huggingface-cli login # for the (private) dataset
|
| 107 |
+
|
| 108 |
+
python train.py \
|
| 109 |
+
--base_model openai/whisper-medium --run_name my-run \
|
| 110 |
+
--per_device_train_batch_size 8 --gradient_accumulation_steps 4 \
|
| 111 |
+
--learning_rate 1e-5 --warmup_steps 500 --max_steps 6000
|
| 112 |
+
|
| 113 |
+
python evaluate_model.py --model runs/my-run # WER / CER
|
| 114 |
+
```
|
| 115 |
+
Note: some checkpoints (e.g. large-v3-turbo) ship in fp16 — `train.py` force-loads
|
| 116 |
+
fp32 so `generate()` doesn't crash at eval. bf16 autocast is used for training.
|
| 117 |
+
|
| 118 |
## Usage
|
| 119 |
```python
|
| 120 |
import torch, torchaudio
|