Views
No views yet
facebook/mms-1b-all
(Wav2Vec2 / CTC) for automatic speech recognition (ASR) in Ewe (ee,
ewe_Latn), a low-resource Gbe language spoken in Togo and Ghana.Wav2Vec2ForCTC (the Ewe adapter is baked into the weights).ee)facebook/mms-1b-all| Model | Split | WER (%) ↓ | CER (%) ↓ |
|---|---|---|---|
Baseline mms-1b-all (before fine-tuning) | validation | 100.00 | 236.73 |
| This model (fine-tuned) | validation | 29.19 | 6.82 |
1import torch, soundfile as sf, soxr
2from transformers import AutoProcessor, Wav2Vec2ForCTC
3
4repo = "romaricnadjire/mms-ewe-asr-mixed"
5processor = AutoProcessor.from_pretrained(repo) # tokenizer target_lang="ewe" is baked in
6model = Wav2Vec2ForCTC.from_pretrained(repo).eval()
7
8audio, sr = sf.read("audio.wav", dtype="float32")
9if audio.ndim == 2:
10 audio = audio.mean(axis=1)
11if sr != 16000:
12 audio = soxr.resample(audio, sr, 16000)
13
14inputs = processor(audio, sampling_rate=16000, return_tensors="pt")
15with torch.inference_mode():
16 logits = model(inputs.input_values).logits
17pred_ids = torch.argmax(logits, dim=-1)
18print(processor.batch_decode(pred_ids, skip_special_tokens=True)[0])facebook/mms-1b-all (MMS adapter + CTC head trained; ctc_zero_infinity=True).facebook/mms-1b-all) by Meta AI — CC-BY-NC 4.0.facebook/mms-1b-all and is released under
CC-BY-NC-4.0 (non-commercial). Please credit the base model (Meta MMS) and
the data sources above (notably BibleTTS, CC-BY-SA 4.0).Academic / portfolio project. Not legal advice; verify licenses before any non-research or commercial use.