Downloads · 30 days
7
21% of all-time downloads
burkialisher5/Ormuri_ASR
Ormuri_ASR is a automatic speech recognition model from burkialisher5. Use it when you need speech turned into text. It is set up for transformers. The card lists the license as apache-2.0.
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-Irani…
Downloads · 30 days
7
21% of all-time downloads
All-time downloads
33
Public
Parameters
764M
1.5 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors1.5 GB · 100%
From the Hugging Face model README
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).
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) |
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"])
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)
lr=3e-4).pashto-ghag-whisper-medium-asr).