Views
No views yet
openai/whisper-small (task=translate mode), fine-tuned directly on
Hausa audio -> English text pairs from
McGill-NLP/NaijaS2ST,
skipping the Hausa-text intermediate step entirely (unlike the project's main
cascade at
nahomazmach/whisper-small-hadirect_pilot/RESULTS.md for the full methodology).| Metric | Value |
|---|---|
| Validation BLEU | 0.24 |
| Validation chrF++ | 14.39 |
dev split (validation here is
derived from the train split) — treat this as a feasibility pilot, not a
final benchmark number.1import torch
2from peft import PeftModel
3from transformers import WhisperForConditionalGeneration, WhisperProcessor
4
5processor = WhisperProcessor.from_pretrained("nahomazmach/whisper-small-ha-en-direct-pilot")
6base_model = WhisperForConditionalGeneration.from_pretrained("openai/whisper-small")
7model = PeftModel.from_pretrained(base_model, "nahomazmach/whisper-small-ha-en-direct-pilot")
8
9# input_features = processor.feature_extractor(audio_array, sampling_rate=16000, return_tensors="pt").input_features
10predicted_ids = model.generate(input_features, language="hausa", task="translate", max_new_tokens=225)
11english = processor.tokenizer.batch_decode(predicted_ids, skip_special_tokens=True)[0]