Downloads · 30 days
167
100% of all-time downloads
Tass02/whisper-small-libyan
whisper-small-libyan is a automatic speech recognition model from Tass02. Use it when you need speech turned into text. The card lists the license as apache-2.0.
This model is a fine-tuned version of OpenAI Whisper Small specifically optimized for Automatic Speech Recognition (ASR) in Libyan Arabic dialect.
Downloads · 30 days
167
100% of all-time downloads
All-time downloads
167
Public
Parameters
242M
967 MB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors967 MB · 100%
From the Hugging Face model README
This model is a fine-tuned version of OpenAI Whisper Small specifically optimized for Automatic Speech Recognition (ASR) in Libyan Arabic dialect.
The model was trained using LoRA (Low-Rank Adaptation) and subsequently merged with the base model weights (Merge & Unload). This allows for standalone deployment and efficient inference without requiring additional adapter loading.
openai/whisper-smallYou can load and run this model using Python with transformers, torch, and librosa:
import torch
import librosa
from transformers import WhisperProcessor, WhisperForConditionalGeneration
# 1. Load model and processor from Hugging Face Hub
model_id = "Tass02/whisper-small-libyan"
processor = WhisperProcessor.from_pretrained(model_id)
model = WhisperForConditionalGeneration.from_pretrained(model_id).to("cuda")
model.eval()
# 2. Transcription function
def transcribe_audio(audio_file_path):
audio_array, _ = librosa.load(audio_file_path, sr=16000)
input_features = processor(audio_array, sampling_rate=16000, return_tensors="pt").input_features.to("cuda")
with torch.no_grad():
generated_ids = model.generate(
input_features,
language="arabic",
task="transcribe",
no_repeat_ngram_size=3,
repetition_penalty=1.1,
num_beams=5,
max_new_tokens=225
)
return processor.batch_decode(generated_ids, skip_special_tokens=True)[0]
# 3. Example usage
transcription = transcribe_audio("path_to_audio.mp3")
print("Transcription:", transcription)