Fine-tune of
openai/whisper-small on
AfriSpeech-200 for
African-accented English speech recognition, spanning both
general and
clinical/medical domains.
The hardest accents are mostly smaller, under-represented Nigerian accents — an important
coverage/equity consideration. Full per-accent numbers: eval_wer_breakdown.csv.
1import torch
2from transformers import WhisperForConditionalGeneration, WhisperProcessor
3
4model = WhisperForConditionalGeneration.from_pretrained("Professor/whisper-small-afrispeech")
5processor = WhisperProcessor.from_pretrained("Professor/whisper-small-afrispeech")
6
7# audio: a 16 kHz mono waveform (numpy array)
8inputs = processor(audio, sampling_rate=16000, return_tensors="pt")
9ids = model.generate(inputs.input_features, language="english", task="transcribe")
10print(processor.batch_decode(ids, skip_special_tokens=True)[0])
1@article{olatunji2023afrispeech,
2 title={AfriSpeech-200: Pan-African Accented Speech Dataset for Clinical and General Domain ASR},
3 author={Olatunji, Tobi and others},
4 journal={Transactions of the Association for Computational Linguistics},
5 year={2023}
6}