Model reference · open weights

wav2vec2-xls-r-wolof-lm

Available as managed deployment Audio abdouaziiz · community Speech→text 1 variants 1k dl/mo

wav2vec2-xls-r-wolof-lm is an open-weight audio or speech model from abdouaziiz. AxForge deploys and operates it for you on dedicated EU-owned hardware — with the licence handled where one is required.

Available as managed deployment — configured and operated for you on dedicated EU hardware, quoted per deployment.

What it is

Released byabdouaziiz
TypeAudio & music
TaskSpeech→text
Runs withtransformers
Released2022-03-02
Popularity1k downloads / month
LicenceOpen weights

About

What wav2vec2-xls-r-wolof-lm is

Wolof is a language spoken in Senegal and neighbouring countries, this language is not too well represented, there are few resources in the field of Text en speech In this sense we aim to bring our contribution to this, it is in this sense that enters this repo.

This model is a fine-tuned version of facebook/wav2vec2-xls-r-300m ,with a language model that is fine-tuned with the largest available speech dataset of the ALFFA_PUBLIC

It achieves the following results on the evaluation set:

  • Loss: 0.367826
  • Wer: 0.212565
Read the full model card

Model description

The duration of the training data is 16.8 hours, which we have divided into 10,000 audio files for the training and 3,339 for the test.

Training and evaluation data

We eval the model at every 1500 step , and log it . and save at every 33340 step

Training hyperparameters

The following hyperparameters were used during training:

  • learning_rate: 1e-4
  • train_batch_size: 3
  • eval_batch_size : 8
  • total_train_batch_size: 64
  • total_eval_batch_size: 64
  • optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
  • lr_scheduler_type: linear
  • lr_scheduler_warmup_steps: 1000
  • num_epochs: 10.0

Training results

StepTraining LossValidation LossWer
15002.8542000.6422430.543964
30000.5992000.4681380.429549
45000.4683000.4334360.405644
60000.4270000.3848730.344150
75000.3770000.3740030.323892
90000.3370000.3636740.306189
105000.3024000.3498840 .283908
120000.2641000.3441040.277120
135000 .2540000.3418200.271316
150000.2084000.3265020.260695
165000.2035000.3262090.250313
180000.1598000.3235390.239851
195000.1582000.3106940.230028
210000.1328000.3383180.229283
225000.1128000.3367650.224145
240000.1036000.3502080.227073
255000.0914000.3536090.221589
270000.0844000.3678260.212565

Usage

The model can be used directly as follows:

import librosa
import warnings
from transformers import AutoProcessor, AutoModelForCTC
from datasets import Dataset, DatasetDict
from datasets import load_metric

wer_metric = load_metric("wer")

wolof = pd.read_csv('Test.csv') # wolof contains the columns of file , and transcription
wolof = DatasetDict({'test': Dataset.from_pandas(wolof)})

chars_to_ignore_regex = '[\"\?\.\!\-\;\:\(\)\,]'

def remove_special_characters(batch):
    batch["transcription"] = re.sub(chars_to_ignore_regex, '', batch["transcription"]).lower() + " "
    return batch

wolof = wolof.map(remove_special_characters)

processor = AutoProcessor.from_pretrained("abdouaziiz/wav2vec2-xls-r-300m-wolof-lm")
model = AutoModelForCTC.from_pretrained("abdouaziiz/wav2vec2-xls-r-300m-wolof-lm")

warnings.filterwarnings("ignore")
def speech_file_to_array_fn(batch):
    speech_array, sampling_rate = librosa.load(batch["file"], sr = 16000)
    batch["speech"] = speech_array.astype('float16')
    batch["sampling_rate"] = sampling_rate
    batch["target_text"] = batch["transcription"]
    return batch

wolof = wolof.map(speech_file_to_array_fn, remove_columns=wolof.column_names["test"], num_proc=1)

def map_to_result(batch):
    model.to("cuda")
    input_values = processor(
      batch["speech"],
      sampling_rate=batch["sampling_rate"],
      return_tensors="pt"
    ).input_values.to("cuda")

    with torch.no_grad():
        logits = model(input_values).logits
        pred_ids = torch.argmax(logits, dim=-1)
        batch["pred_str"] = processor.batch_decode(pred_ids)[0]

    return batch

 results = wolof["test"].map(map_to_result)

 print("Test WER: {:.3f}".format(wer_metric.compute(predictions=results["pred_str"], references=results["transcription"])))

PS:

The results obtained can be improved by using :

  • Wav2vec2 + language model .
  • Build a Spellcheker from the text of the data
  • Sentence Edit Distance

From the published model card. Full card on the HuggingFace links in the sidebar.

Benchmarks

Reported results

As published on the model card — the maker's own numbers, not measured by AxForge.

TaskDatasetMetricScore
Speech RecognitionTest WER21.250
Speech RecognitionValidation Loss0.360

Using it via the API

Call it like any OpenAI endpoint

Once AxForge deploys wav2vec2-xls-r-wolof-lm for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (wav2vec2-xls-r-wolof-lm below is illustrative; you get the exact model name on deployment.)

$ curl -sS https://api.axforge.ai/v1/audio/transcriptions \
  -H "Authorization: Bearer $AXFORGE_API_KEY" \
  -F model="wav2vec2-xls-r-wolof-lm" -F file=@audio.mp3

Create an account — your API key is available in the console. 3M free tokens every 30 days with every new account.

© 2026 AxForge · EU-hosted AI infrastructure Pricing Docs Trust Privacy Terms