You need to agree to share your contact information to access this model

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this model content.

Inference Example

from transformers import Wav2Vec2Processor, Wav2Vec2ForCTC
import torch
import librosa
import os

model_name = "guymandude/MMS-ASR-ZA-11"

def load_audio_file(path):
    audio_array, sampling_rate = librosa.load(path, sr=None)
    return {"array": audio_array, "sampling_rate": sampling_rate}

model = Wav2Vec2ForCTC.from_pretrained(model_name,ignore_mismatched_sizes=True).to("cuda")
processor = Wav2Vec2Processor.from_pretrained(model_name)
# change to supported languages [eng, afr, sot, zul, xho, nso, nbl, tso, tsn, ven, ssw]
model.load_adapter("tsn")
processor.tokenizer.set_target_lang("tsn")

audio = load_audio_file("<AUDIO PATH>")

input_dict = processor(audio["array"], sampling_rate=16_000, return_tensors="pt", padding=True)

logits = model(input_dict.input_values.to("cuda")).logits

pred_ids = torch.argmax(logits, dim=-1)[0]

print(processor.decode(pred_ids))
Downloads last month
0
Safetensors
Model size
965M params
Tensor type
F32
·
Inference Examples
Unable to determine this model's library. Check the docs .

Model tree for guymandude/MMS-ASR-South-African-11

Finetuned
(185)
this model

Dataset used to train guymandude/MMS-ASR-South-African-11