Views
No views yet
pashto-ghag-whisper-medium-asr, OpenAI Whisper Medium fine-tuned on Pashto) adapted specifically for Ormuri (oru), an endangered Indo-Iranian language spoken in Kaniguram (South Waziristan, Pakistan) and Logar (Afghanistan).pashto-ghag-whisper-medium-asr)oru)WhisperForConditionalGeneration (Whisper Medium - 769M parameters)r=32, alpha=64, modules: q_proj, v_proj, k_proj, out_proj, fc1, fc2)| Model Version | Target Language | WER (%) | CER (%) | Delta WER vs Baseline |
|---|---|---|---|---|
| Zero-Shot Pashto Ghag Base | Ormuri (oru) | 84.86% | 37.08% | Baseline |
| Fine-Tuned Checkpoint 100 | Ormuri (oru) | 36.54% | 12.89% | -48.32 pp |
| Fine-Tuned Checkpoint 200 | Ormuri (oru) | 25.78% | 8.35% | -59.08 pp |
| Fine-Tuned Checkpoint 300 | Ormuri (oru) | 23.18% | 7.29% | -61.68 pp |
| Fine-Tuned Checkpoint 400 | Ormuri (oru) | 20.44% | 6.41% | -64.42 pp |
| Fine-Tuned Checkpoint 600 (This Model) | Ormuri (oru) | 18.39% | 5.65% | -66.47 pp (Best) |
1import torch
2from transformers import pipeline
3
4# Initialize pipeline
5asr_pipeline = pipeline(
6 "automatic-speech-recognition",
7 model="burkialisher5/Ormuri_ASR",
8 device="cuda" if torch.cuda.is_available() else "cpu",
9 torch_dtype=torch.float16 if torch.cuda.is_available() else torch.float32,
10)
11
12# Transcribe Ormuri audio file
13result = asr_pipeline("path/to/ormuri_sample.wav")
14print("Ormuri Transcription:", result["text"])1import torch
2import librosa
3from transformers import WhisperProcessor, WhisperForConditionalGeneration
4
5device = "cuda" if torch.cuda.is_available() else "cpu"
6
7processor = WhisperProcessor.from_pretrained("burkialisher5/Ormuri_ASR")
8model = WhisperForConditionalGeneration.from_pretrained(
9 "burkialisher5/Ormuri_ASR",
10 torch_dtype=torch.float16 if device == "cuda" else torch.float32
11).to(device)
12
13# Load audio resampled to 16kHz
14audio, sr = librosa.load("path/to/ormuri_sample.wav", sr=16000)
15
16input_features = processor(audio, sampling_rate=16000, return_tensors="pt").input_features.to(device)
17if device == "cuda":
18 input_features = input_features.to(torch.float16)
19
20forced_decoder_ids = processor.get_decoder_prompt_ids(language="pashto", task="transcribe")
21
22with torch.no_grad():
23 predicted_ids = model.generate(input_features, forced_decoder_ids=forced_decoder_ids, max_new_tokens=225)
24
25transcription = processor.batch_decode(predicted_ids, skip_special_tokens=True)[0]
26print("Ormuri Transcription:", transcription)lr=3e-4).pashto-ghag-whisper-medium-asr).