Bahraini ASR (Whisper Fine-tune)

Bahraini Arabic ASR fine-tune based on MohamedRashad/Arabic-Whisper-CodeSwitching-Edition.

Public model package

  • bahraini_asr_codeswitching
  • this public package is the Bahraini ASR release bundle kept under a stable name instead of a raw checkpoint folder
  • tokenizer config was normalized for direct WhisperProcessor.from_pretrained(...) loading
  • interactive listening page: Hishambarakat/Bahraini_ASR_Review

Inference

Install the Python dependencies listed in requirements.txt first:

pip install -r requirements.txt
import torch
from transformers import WhisperForConditionalGeneration, WhisperProcessor, pipeline

model_id = "Hishambarakat/Bahraini_ASR"
subfolder = "bahraini_asr_codeswitching"

processor = WhisperProcessor.from_pretrained(model_id, subfolder=subfolder)
model = WhisperForConditionalGeneration.from_pretrained(model_id, subfolder=subfolder)

pipe = pipeline(
    "automatic-speech-recognition",
    model=model,
    tokenizer=processor.tokenizer,
    feature_extractor=processor.feature_extractor,
    device=0 if torch.cuda.is_available() else -1,
)

result = pipe("/path/to/audio.wav", generate_kwargs={"language": "ar", "task": "transcribe"})
print(result["text"])

What was trained

  • Base model: MohamedRashad/Arabic-Whisper-CodeSwitching-Edition
  • Baseline pretraining data included MohamedRashad/arabic-english-code-switching
  • Private Bahraini speech corpus with manual transcript cleanup
  • Dialect-specific correction passes for Bahraini phrasing
  • Review-driven checkpoint selection from unseen clips
  • The public release is packaged under bahraini_asr_codeswitching

Why Bahraini fine-tuning matters

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.

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.

Bahraini ASR overview

Evaluation summary

This checkpoint was selected from a manual unseen-clip review rather than a formal WER/CER benchmark.

On the original 50-clip checkpoint-1250 review sheet:

  • ours: 22
  • tie: 20
  • baseline: 4
  • both_bad: 4

Raw counts from that sheet suggest a strong advantage for the fine-tuned model, but for public-facing reporting we should be more conservative than the raw sheet alone:

  • a reasonable conservative takeaway is that the fine-tuned model was better on at least roughly 60%+ of meaningful cases
  • it was at minimum competitive with the baseline on a clear majority of the reviewed clips
  • exact percentages should be treated as approximate because some rows were later re-checked manually and a few public-facing examples were judged more cautiously

This original review result is the main reason checkpoint-1250 was chosen as the public release over later checkpoints.

Important note:

  • these counts come from the original checkpoint-1250 review CSV
  • the local example table below was re-vetted manually afterward
  • some later local proxy review files had labeling inconsistencies, so the example table is treated as the more conservative public-facing evidence set
  • in other words: the counts below are from the original 1250 review pass, while the example rows were hand-pruned to avoid overstating wins

Dialect preservation candidates

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:

  • text
  • text_asr_v5_raw

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.

Topline from that pass:

  • total train rows scanned: 52,695
  • changed transcript rows (text != text_asr_v5_raw): 50,335
  • heuristic dialect-shift candidates: 360
  • strict local-to-common substitution cases: 37

Conservative interpretation:

  • heuristic dialect-shift candidates account for about 0.72% of changed rows
  • the stricter local-to-common subset accounts for about 0.07% of changed rows
  • these are small percentages in absolute terms, but they are high-value because they target the exact dialect-preservation failure mode we care about

Most common strict patterns found:

  • ู„ูŠุด -> ู„ูŠู‡: 19
  • ู…ุจ -> ู…ุด: 18

Useful framing:

  • some baseline outputs are semantically plausible, but they do not preserve the speaker's original dialect wording
  • this analysis is best treated as dialect preservation candidate mining, not formal detection accuracy

Review examples

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.

Hugging Face model cards do not show a built-in inline playbar for these samples here. Click a .wav link below and Hugging Face/browser will open the file in its audio player.

Sample Ours (checkpoint-1250) Baseline Vote
sample_01.wav ุนู„ุดุงู† ุงุญู†ุง ู†ุณูˆูŠ ู‡ุฐุง ุงู„ู†ุฒูˆู„ ุงูˆ ู†ู‡ุฏู ู„ู‡ุฐุง ุงู„ู†ูˆุน ู…ู† ุงู„ู†ุฒูˆู„ ุนู„ุดุงู† ู†ู‡ุฏู ู„ู‡ุฐุง ุงู„ู†ุฒูˆู„ ู…ู‡ู… ours
sample_02.wav ู†ู†ุชู‚ู„ ู…ู† ุงู„ุดู‚ ุงู„ุจุตุฑูŠ ุฅู„ู‰ ุงู„ุดู‚ ุงู„ูƒุชุงุจูŠ ู„ุฃู† ุงู„ูƒุชุงุจุฉ ู‡ูŠ ู†ูˆุน ู…ู† ู†ูˆุน ุงู„ุฎูŠุงู„ ุจุนุฏ ู†ู†ุชู‚ู„ ู…ู† ุงู„ุดู‚ ุงู„ุจุตุฑูŠ ุฅู„ู‰ ุงู„ุดู‚ ุงู„ูƒุชุงุจูŠ ู„ุฃู† ุงู„ูƒุชุงุจ ู‡ูŠ ู†ูˆุน ู…ู† ู†ูˆุน ุงู„ุฎูŠุงู„ ุจุนุฏ ours
sample_03.wav ุดู†ูˆ ูŠุนู†ูŠ ู…ู† ู‚ุตุต ุชุนุฑููŠู†ู‡ุง ููŠ ู‡ุฐู‡ ุงู„ุตุฏุฏุŸ ู…ู† ู‚ุตุต ุชุนุฑููŠู†ู‡ุง ููŠ ู‡ุฐู‡ ุงู„ุตุฏุฏุŸ ours
sample_04.wav ุงู„ู‚ูŠุงู… ุงุชูˆุงุถุญู„ูŠ ุงุดู„ูˆู† ุงู†ุง ุงุจูŠ ุงูˆุตู„ ุญู‚ ู‡ุงูŠ ุงู„ุฃู‡ุฏุงู ุงู„ู‚ูŠุงู… ุชูˆุถุญ ู„ูŠ ุฃุดู„ูˆู† ูˆุฃู†ุง ุจูŠูˆุตู„ ุญู‚ ู‡ุฐู‡ ุงู„ุฃู‡ุฏุงู ours
sample_05.wav ู‚ุงุฆู…ุง ูŠุนู†ูŠ ู†ุฒู„ ุญู‚ ู…ู†ุงุฒู„ ู‡ุฐู‡ ุงู„ู†ุงุณ ูˆุฎู„ู‘ูƒ ูŠุนู†ูŠ ุฃุฏู† ู…ู†ู‡ู… ุทุงูŠู…ุงู‹ ูŠุนู†ูŠ ุงู†ุฒู„ ุญุฌู… ู†ุงุฒู„ ู‡ุฐู‡ ุงู„ู†ุงุณ ูˆ ุฎู„ูƒ ูŠุนู†ูŠ ุฃุฏู†ู‰ ู…ู†ู‡ู… ours
sample_06.wav ูŠุนู†ูŠ ููŠุฏูŠูˆ ุณุญุจูƒ ุนู„ู‰ ููŠุฏูŠูˆ ุณุญุจูƒ ุนู„ู‰ ุงู„ุซุงู†ูŠ ู…ูˆุนุช ุงู„ุฃุทุงู„ู‚ ุณุงุนุฉ ุซู†ุชูŠู† ูŠุนู†ูŠ ููŠุฏูŠูˆ ุณุญุจูƒ ุนู„ู‰ ููŠุฏูŠูˆ ุณุญุจูƒ ุนู„ู‰ ุซุงู†ูŠ ู…ุงูˆุนูŠุชูƒ ู„ุชุทู„ุน ุงู„ุณุงุนุฉ ุงุซู†ุชูŠู† ours
sample_07.wav ูุฏุงุฆู…ุง ู‡ู†ุง ุฌูˆู„ุงุช ุงู„ุฃูƒู„ ู‡ูŠ ุงู„ู„ูŠ ุชุฑุจุทูƒ ู ุฏุงุฆู…ุง ู‡ู†ุง ุฌูˆู„ุงุช ุงู„ุฃูƒู„ ู‡ูŠ ุงู„ู„ูŠ ุชุฑุจุทูƒ ours

Notes

  • This repo is model-only.
  • The training dataset is private and published separately.
  • These examples are kept conservative to avoid showing rows that we manually disagree with.
  • The sample links above open the WAV files directly from the Hub rather than embedding a playbar inside the model card.
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support