Instructions to use Hishambarakat/Bahraini_ASR with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Hishambarakat/Bahraini_ASR with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("automatic-speech-recognition", model="Hishambarakat/Bahraini_ASR")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Hishambarakat/Bahraini_ASR", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -19,6 +19,7 @@ Bahraini Arabic ASR fine-tune based on `MohamedRashad/Arabic-Whisper-CodeSwitchi
|
|
| 19 |
|
| 20 |
- `bahraini_asr_codeswitching`
|
| 21 |
- this public package is the Bahraini ASR release bundle kept under a stable name instead of a raw checkpoint folder
|
|
|
|
| 22 |
- interactive listening page: [`Hishambarakat/Bahraini_ASR_Review`](https://huggingface.co/spaces/Hishambarakat/Bahraini_ASR_Review)
|
| 23 |
|
| 24 |
## Inference
|
|
@@ -48,11 +49,20 @@ print(result["text"])
|
|
| 48 |
## What was trained
|
| 49 |
|
| 50 |
- Base model: `MohamedRashad/Arabic-Whisper-CodeSwitching-Edition`
|
|
|
|
| 51 |
- Private Bahraini speech corpus with manual transcript cleanup
|
| 52 |
- Dialect-specific correction passes for Bahraini phrasing
|
| 53 |
- Review-driven checkpoint selection from unseen clips
|
| 54 |
- The public release is packaged under `bahraini_asr_codeswitching`
|
| 55 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 56 |
## Evaluation summary
|
| 57 |
|
| 58 |
This checkpoint was selected from a manual unseen-clip review rather than a formal WER/CER benchmark.
|
|
@@ -79,6 +89,38 @@ Important note:
|
|
| 79 |
- some later local proxy review files had labeling inconsistencies, so the example table is treated as the more conservative public-facing evidence set
|
| 80 |
- in other words: the counts below are from the original 1250 review pass, while the example rows were hand-pruned to avoid overstating wins
|
| 81 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 82 |
## Review examples
|
| 83 |
|
| 84 |
These clips are the strongest remaining `ours` wins from the corrected local review file after removing rows that we manually judged as baseline, tie, or both_bad.
|
|
|
|
| 19 |
|
| 20 |
- `bahraini_asr_codeswitching`
|
| 21 |
- this public package is the Bahraini ASR release bundle kept under a stable name instead of a raw checkpoint folder
|
| 22 |
+
- tokenizer config was normalized for direct `WhisperProcessor.from_pretrained(...)` loading
|
| 23 |
- interactive listening page: [`Hishambarakat/Bahraini_ASR_Review`](https://huggingface.co/spaces/Hishambarakat/Bahraini_ASR_Review)
|
| 24 |
|
| 25 |
## Inference
|
|
|
|
| 49 |
## What was trained
|
| 50 |
|
| 51 |
- Base model: `MohamedRashad/Arabic-Whisper-CodeSwitching-Edition`
|
| 52 |
+
- Baseline pretraining data included `MohamedRashad/arabic-english-code-switching`
|
| 53 |
- Private Bahraini speech corpus with manual transcript cleanup
|
| 54 |
- Dialect-specific correction passes for Bahraini phrasing
|
| 55 |
- Review-driven checkpoint selection from unseen clips
|
| 56 |
- The public release is packaged under `bahraini_asr_codeswitching`
|
| 57 |
|
| 58 |
+
## Why Bahraini fine-tuning matters
|
| 59 |
+
|
| 60 |
+
The baseline model is useful, but its upstream code-switching data includes a broader Arabic mix and is not specialized for Bahraini dialect preservation. In practice, that means some outputs can be semantically plausible while still drifting away from the speaker's local wording.
|
| 61 |
+
|
| 62 |
+
This matters for Bahraini ASR because a transcript can look "close enough" in standard Arabic or another dialect while still failing to preserve the actual form that was spoken.
|
| 63 |
+
|
| 64 |
+

|
| 65 |
+
|
| 66 |
## Evaluation summary
|
| 67 |
|
| 68 |
This checkpoint was selected from a manual unseen-clip review rather than a formal WER/CER benchmark.
|
|
|
|
| 89 |
- some later local proxy review files had labeling inconsistencies, so the example table is treated as the more conservative public-facing evidence set
|
| 90 |
- in other words: the counts below are from the original 1250 review pass, while the example rows were hand-pruned to avoid overstating wins
|
| 91 |
|
| 92 |
+
## Dialect preservation candidates
|
| 93 |
+
|
| 94 |
+
In addition to the manual 50-clip review, we ran a separate text-only mining pass over the private training corpus to look for likely dialect-preservation patterns between:
|
| 95 |
+
|
| 96 |
+
- `text`
|
| 97 |
+
- `text_asr_v5_raw`
|
| 98 |
+
|
| 99 |
+
This is not a benchmark and should not be read as ASR accuracy. It is a heuristic analysis meant to surface likely cases where a local Bahraini form was shifted toward a more common outside-dialect form.
|
| 100 |
+
|
| 101 |
+
Topline from that pass:
|
| 102 |
+
|
| 103 |
+
- total train rows scanned: `52,695`
|
| 104 |
+
- changed transcript rows (`text != text_asr_v5_raw`): `50,335`
|
| 105 |
+
- heuristic dialect-shift candidates: `360`
|
| 106 |
+
- strict local-to-common substitution cases: `37`
|
| 107 |
+
|
| 108 |
+
Conservative interpretation:
|
| 109 |
+
|
| 110 |
+
- heuristic dialect-shift candidates account for about `0.72%` of changed rows
|
| 111 |
+
- the stricter local-to-common subset accounts for about `0.07%` of changed rows
|
| 112 |
+
- these are small percentages in absolute terms, but they are high-value because they target the exact dialect-preservation failure mode we care about
|
| 113 |
+
|
| 114 |
+
Most common strict patterns found:
|
| 115 |
+
|
| 116 |
+
- `ليش -> ليه`: `19`
|
| 117 |
+
- `مب -> مش`: `18`
|
| 118 |
+
|
| 119 |
+
Useful framing:
|
| 120 |
+
|
| 121 |
+
- some baseline outputs are semantically plausible, but they do not preserve the speaker's original dialect wording
|
| 122 |
+
- this analysis is best treated as **dialect preservation candidate mining**, not formal detection accuracy
|
| 123 |
+
|
| 124 |
## Review examples
|
| 125 |
|
| 126 |
These clips are the strongest remaining `ours` wins from the corrected local review file after removing rows that we manually judged as baseline, tie, or both_bad.
|