google/WaxalNLP
Preview • Updated • 78.9k • 265
How to use smutuvi/ethio_w2vbert_amh_orm_waxal with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("automatic-speech-recognition", model="smutuvi/ethio_w2vbert_amh_orm_waxal") # Load model directly
from transformers import AutoProcessor, AutoModelForCTC
processor = AutoProcessor.from_pretrained("smutuvi/ethio_w2vbert_amh_orm_waxal")
model = AutoModelForCTC.from_pretrained("smutuvi/ethio_w2vbert_amh_orm_waxal", device_map="auto")Multilingual CTC ASR for Amharic and Oromo, fine-tuned from facebook/w2v-bert-2.0 on google/WaxalNLP (amh_asr, orm_asr).
Aligned with Ethio-ASR training: frozen encoder, final adapter, custom CTC vocab, language tags [AMH]| / [ORM]|.
runs/ethio-w2vbert/facebook-w2v-bert-2.0-01062026-054407/checkpoint-47590from transformers import AutoModelForCTC, AutoProcessor
import torch
import torchaudio
model_id = "smutuvi/ethio_w2vbert_amh_orm_waxal"
processor = AutoProcessor.from_pretrained(model_id)
model = AutoModelForCTC.from_pretrained(model_id)
model.eval()
waveform, sr = torchaudio.load('path/to/audio.wav')
if sr != 16000:
waveform = torchaudio.functional.resample(waveform, sr, 16000)
inputs = processor(waveform.squeeze().numpy(), sampling_rate=16000, return_tensors='pt')
with torch.no_grad():
logits = model(**inputs).logits
pred = processor.batch_decode(logits.argmax(-1))
print(pred[0])
./bash_scripts/run_eval_ethio_waxal.sh smutuvi/ethio_w2vbert_amh_orm_waxal
Base model
facebook/w2v-bert-2.0