badrex/ethiopian-speech-flat
Viewer โข Updated โข 128k โข 409 โข 2
How to use hadamard-2/w2v-bert-2.0-amharic-asr with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("automatic-speech-recognition", model="hadamard-2/w2v-bert-2.0-amharic-asr") # Load model directly
from transformers import AutoProcessor, AutoModelForCTC
processor = AutoProcessor.from_pretrained("hadamard-2/w2v-bert-2.0-amharic-asr")
model = AutoModelForCTC.from_pretrained("hadamard-2/w2v-bert-2.0-amharic-asr", device_map="auto")This is a Automatic Speech Recognition (ASR) model for Amharic, one of the official languages of Ethiopia. It is fineโtuned from Wav2Vec2โBERT 2.0 using the Ethio speech corpus.
from transformers import Wav2Vec2BertProcessor, Wav2Vec2BertForCTC
import torchaudio, torch
processor = Wav2Vec2BertProcessor.from_pretrained("badrex/w2v-bert-2.0-amharic-asr")
model = Wav2Vec2BertForCTC.from_pretrained("badrex/w2v-bert-2.0-amharic-asr")
audio, sr = torchaudio.load("audio.wav")
inputs = processor(audio.squeeze(), sampling_rate=sr, return_tensors="pt")
with torch.no_grad():
logits = model(**inputs).logits
pred_ids = torch.argmax(logits, dim=-1)
transcription = processor.batch_decode(pred_ids)[0]
print(transcription)
Performance varies with accents, dialects, and recording quality.
@misc{w2v_bert_ethiopian_asr,
author = {Badr M. Abdullah},
title = {Fine-tuning Wav2Vec2-BERT 2.0 for Ethiopian ASR},
year = {2025},
url = {https://huggingface.co/badrex/w2v-bert-2.0-amharic-asr}
}
Base model
facebook/w2v-bert-2.0