Downloads · 30 days
7
10% of all-time downloads
Simih/yoruba_asr_audio_llm
yoruba_asr_audio_llm is a machine learning model from Simih. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as apache-2.0.
Fine-tuned version of Qwen2-Audio-7B-Instruct for Yoruba automatic speech recognition (ASR), trained on the AfricanVoices corpus using LoRA.
Downloads · 30 days
7
10% of all-time downloads
All-time downloads
73
Public
Parameters
8.4B
16.8 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors16.8 GB · 100%
From the Hugging Face model README
Fine-tuned version of Qwen2-Audio-7B-Instruct for Yoruba automatic speech recognition (ASR), trained on the AfricanVoices corpus using LoRA.
import librosa
import torch
from transformers import Qwen2AudioForConditionalGeneration, AutoProcessor
model_id = "Simih/yoruba_asr_audio_llm"
model = Qwen2AudioForConditionalGeneration.from_pretrained(
model_id, torch_dtype=torch.bfloat16, trust_remote_code=True
).to("cuda")
processor = AutoProcessor.from_pretrained(model_id, trust_remote_code=True, sampling_rate=16000)
audio, sr = librosa.load("sample.flac", sr=processor.feature_extractor.sampling_rate)
conversation = [
{"role": "user", "content": [
{"type": "audio"},
{"type": "text", "text": "Transcribe the audio"},
]}
]
text = processor.apply_chat_template(conversation, add_generation_prompt=True, tokenize=False)
inputs = processor(text=[text], audio=[audio], return_tensors="pt").to("cuda")
generate_ids = model.generate(**inputs, max_new_tokens=256)
generate_ids = generate_ids[:, inputs.input_ids.size(1):]
print(processor.batch_decode(generate_ids, skip_special_tokens=True)[0])
Yoruba speech dataset from the AfricanVoices corpus. Paired audio-transcription samples across multiple speakers and domains.
| Metric | Score |
|---|---|
| WER | 44.1% |
Evaluated on the AfricanVoices Yoruba test set with Yoruba text normalization (lowercasing, punctuation removal, unicode NFC normalization).