CoolFace
Modelpublic

badrex/w2v-bert-2.0-shona-asr

sourceHugging Facecc-by-4.0updated 11mo agoView on Hugging Face
3likes163downloads
Model Card

<div align="center" style="line-height: 1;"> <h1>Automatic Speech Recognition for Shona</h1> <a href="https://huggingface.co/datasets/badrex/shona-speech" target="blank" style="margin: 2px;"> <img alt="Hugging Face" src="https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Dataset-ffc107?color=ffca28&logoColor=white" style="display: inline-block; vertical-align: middle;"/> <a href="https://huggingface.co/spaces/badrex/Shona-ASR" target="blank" style="margin: 2px;"> <img alt="Hugging Face" src="https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Space-ffc107?color=c62828&logoColor=white" style="display: inline-block; vertical-align: middle;"/> <a href="https://creativecommons.org/licenses/by/4.0/deed.en" style="margin: 2px;"> <img alt="License" src="https://img.shields.io/badge/License-CC%20BY%204.0-lightgrey.svg" style="display: inline-block; vertical-align: middle;"/> </a> </div>

Model Description ๐Ÿซ

This model is a fine-tuned version of Wav2Vec2-BERT 2.0 for Shona automatic speech recognition (ASR). It was trained on 72 hours of transcribed Shona speech. The ASR model is robust and the in-domain WER is below 23%.

  • โ€”Developed by: Badr al-Absi
  • โ€”Model type: Speech Recognition (ASR)
  • โ€”Language: Shona (sn)
  • โ€”License: CC-BY-4.0
  • โ€”Finetuned from: facebook/w2v-bert-2.0

<!-- ### Examples ๐Ÿš€ | | Audio | Human Transcription | ASR Transcription | |----------|--------|----------------|----------------| | 1 | <audio controls src="https://huggingface.co/badrex/w2v-bert-2.0-zulu-asr/resolve/main/examples/example2.wav"></audio> | Yenza isinqumo ngezilimo uzozitshala kumaphi amasimu uphinde idwebe imephu njengereferensi yakho. | yenza isinqumo ngezilimo ozozitshala kumaphi amasimu uphinde igwebe imephu njengereference yakho | | 2 | <audio controls src="https://huggingface.co/badrex/w2v-bert-2.0-zulu-asr/resolve/main/examples/example3.wav"></audio> | Emdlalweni wokugcina ngokumelene IFrance, wayengumuntu ongasetshenziswanga esikhundleni njengoba i-Argentina inqobe ngo-4-2 nge-penalty ukuze ithole isiqu sayo sesithathu seNdebe Yomhlaba. | emdlalweni wokugqina ngokumelene i-france wayengumuntu ongasetshenziswanga esikhundleni njengoba i-argentina incobe ngo-4-2 ngephelnathi ukuze ithole isiqu sayo sesithathu sendebe yomhlaba | | 3 | <audio controls src="https://huggingface.co/badrex/w2v-bert-2.0-zulu-asr/resolve/main/examples/example_1.wav"></audio> | Amadolobhana angaphandle angaphezu kwamamitha ambalwa, Reneging cishe 140m, amamitha angu-459.3, ngaphezu kogu lolwandle. Le ndawo iningi emahlathini ama-dune asogwini, ikakhulukazi eceleni kwe-zindunduma zasogwini nasedolobheni lase-Meerensee. | amadolobhana angaphandle angaphezu kwamamitha ambalwa reneging cishe 140m amamitha angu 4593 ngaphezu kogulolwandle le ndawo iningi emahlabathini amedum esogwini ikakhulukazi eceleni kwezindunduma zasogwini nasedolobheni lasemerins | -->

Direct Use

The model can be used directly for automatic speech recognition of a Shona audio:

python
from transformers import Wav2Vec2BertProcessor, Wav2Vec2BertForCTC
import torch
import torchaudio

# load model and processor
processor = Wav2Vec2BertProcessor.from_pretrained("badrex/w2v-bert-2.0-shona-asr")
model = Wav2Vec2BertForCTC.from_pretrained("badrex/w2v-bert-2.0-shona-asr")

# load audio
audio_input, sample_rate = torchaudio.load("path/to/audio.wav")

# preprocess
inputs = processor(audio_input.squeeze(), sampling_rate=sample_rate, return_tensors="pt")

# inference
with torch.no_grad():
    logits = model(**inputs).logits

# decode
predicted_ids = torch.argmax(logits, dim=-1)
transcription = processor.batch_decode(predicted_ids)[0]
print(transcription)

Downstream Use

This model can be used as a foundation for:

  • โ€”building voice assistants for Shona speakers
  • โ€”transcription services for Shona content
  • โ€”accessibility tools for Shona-speaking communities
  • โ€”research in low-resource speech recognition

Model Architecture

  • โ€”Base model: Wav2Vec2-BERT 2.0
  • โ€”Architecture: transformer-based with convolutional feature extractor
  • โ€”Parameters: ~600M (inherited from base model)
  • โ€”Objective: connectionist temporal classification (CTC)

Funding

The development of this model was supported by CLEAR Global and Gates Foundation.

Citation

bibtex
@misc{w2v_bert_shona_asr,
  author = {Badr M. Abdullah},
  title = {Adapting Wav2Vec2-BERT 2.0 for Shona ASR},
  year = {2025},
  publisher = {Hugging Face},
  url = {https://huggingface.co/badrex/w2v-bert-2.0-shona-asr}
}

Model Card Contact

For questions or issues, please contact via the Hugging Face model repository in the community discussion section.