Automatic Speech Recognition
Transformers
Safetensors
PEFT
Ormuri
Pashto
whisper
audio
pashto
ghag
ormuri
lora
Eval Results (legacy)
Instructions to use burkialisher5/Ormuri_ASR with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use burkialisher5/Ormuri_ASR with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("automatic-speech-recognition", model="burkialisher5/Ormuri_ASR")# Load model directly from transformers import AutoProcessor, AutoModelForSpeechSeq2Seq processor = AutoProcessor.from_pretrained("burkialisher5/Ormuri_ASR") model = AutoModelForSpeechSeq2Seq.from_pretrained("burkialisher5/Ormuri_ASR", device_map="auto") - PEFT
How to use burkialisher5/Ormuri_ASR with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
Ormuri_ASR โ Ormuri ASR Model
This model is a Low-Rank Adaptation (LoRA) fine-tuned version of Pashto Ghag (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).
Model Highlights
- Base Model: Pashto Ghag (
pashto-ghag-whisper-medium-asr) - Target Language: Ormuri (
oru) - Architecture:
WhisperForConditionalGeneration(Whisper Medium - 769M parameters) - Fine-Tuning Method: PEFT / LoRA (
r=32,alpha=64, modules:q_proj,v_proj,k_proj,out_proj,fc1,fc2) - Training Epochs: ~1.62 (Checkpoint 600)
- Primary Metrics:
- Word Error Rate (WER): 18.39% (down from 84.86% zero-shot baseline โ -66.47 pp / 78.3% error reduction)
- Character Error Rate (CER): 5.65% (down from 37.08% zero-shot baseline โ -31.43 pp / 84.7% error reduction)
Benchmark Evaluation Results
| 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) |
Usage & Inference
Pipeline Inference (Easiest)
import torch
from transformers import pipeline
# Initialize pipeline
asr_pipeline = pipeline(
"automatic-speech-recognition",
model="burkialisher5/Ormuri_ASR",
device="cuda" if torch.cuda.is_available() else "cpu",
torch_dtype=torch.float16 if torch.cuda.is_available() else torch.float32,
)
# Transcribe Ormuri audio file
result = asr_pipeline("path/to/ormuri_sample.wav")
print("Ormuri Transcription:", result["text"])
Manual Model Inference
import torch
import librosa
from transformers import WhisperProcessor, WhisperForConditionalGeneration
device = "cuda" if torch.cuda.is_available() else "cpu"
processor = WhisperProcessor.from_pretrained("burkialisher5/Ormuri_ASR")
model = WhisperForConditionalGeneration.from_pretrained(
"burkialisher5/Ormuri_ASR",
torch_dtype=torch.float16 if device == "cuda" else torch.float32
).to(device)
# Load audio resampled to 16kHz
audio, sr = librosa.load("path/to/ormuri_sample.wav", sr=16000)
input_features = processor(audio, sampling_rate=16000, return_tensors="pt").input_features.to(device)
if device == "cuda":
input_features = input_features.to(torch.float16)
forced_decoder_ids = processor.get_decoder_prompt_ids(language="pashto", task="transcribe")
with torch.no_grad():
predicted_ids = model.generate(input_features, forced_decoder_ids=forced_decoder_ids, max_new_tokens=225)
transcription = processor.batch_decode(predicted_ids, skip_special_tokens=True)[0]
print("Ormuri Transcription:", transcription)
Dataset & Training Specs
- Corpus: Ormuri TTS & Speech Dataset (5,922 training audio clips, 705 validation clips, 706 test clips).
- Sampling Rate: 16,000 Hz.
- Hardware: NVIDIA GPU (FP16 mixed precision).
- Optimizer: AdamW (
lr=3e-4).
Citation & Acknowledgements
- Pashto Ghag: Pre-trained Pashto ASR model (
pashto-ghag-whisper-medium-asr). - OpenAI Whisper: Radford et al., Robust Speech Recognition via Large-Scale Weak Supervision.
- Downloads last month
- -
Evaluation results
- Test WER on Ormuri Speech Corpusself-reported18.390
- Test CER on Ormuri Speech Corpusself-reported5.650