Files
wav2vec2-large-xlsr-morocca…/README.md
ModelHub XC 4f976a4dc2 初始化项目,由ModelHub XC社区提供模型
Model: boumehdi/wav2vec2-large-xlsr-moroccan-darija
Source: Original Platform
2026-05-16 10:56:32 +08:00

2.2 KiB

language, base_model, metrics, tags, license, model-index
language base_model metrics tags license model-index
ary facebook/wav2vec2-large-xlsr-53
wer
audio
automatic-speech-recognition
speech
xlsr-fine-tuning-week
apache-2.0
name results
XLSR Wav2Vec2 Moroccan Arabic dialect by Boumehdi
task metrics
name type
Speech Recognition automatic-speech-recognition
name type value
Test WER wer 0.084904

Wav2Vec2-Large-XLSR-53-Moroccan-Darija

wav2vec2-large-xlsr-53 new model

  • Fine-tuned on 57 hours of labeled Darija Audios extracted from MDVC (https://ijeecs.iaescore.com/index.php/IJEECS/article/view/35709) which contains more than 1000 hours of Moroccan Darija "ary".
  • Fine-tuning is ongoing 24/7 to enhance accuracy.
  • We are consistently adding data to the model every day (We prefer not to add all MDVC Corpus at once as we are trying to standardize more and more the way we write the Moroccan Darija).
Training Loss Validation Loss Wer
0.121300 0.103430 0.084904

Usage

The model can be used directly as follows:

import librosa
import torch
from transformers import Wav2Vec2CTCTokenizer, Wav2Vec2ForCTC, Wav2Vec2Processor, TrainingArguments, Wav2Vec2FeatureExtractor, Trainer

tokenizer = Wav2Vec2CTCTokenizer("./vocab.json", unk_token="[UNK]", pad_token="[PAD]", word_delimiter_token="|")
processor = Wav2Vec2Processor.from_pretrained('boumehdi/wav2vec2-large-xlsr-moroccan-darija', tokenizer=tokenizer)
model=Wav2Vec2ForCTC.from_pretrained('boumehdi/wav2vec2-large-xlsr-moroccan-darija')


# load the audio data (use your own wav file here!)
input_audio, sr = librosa.load('file.wav', sr=16000)

# tokenize
input_values = processor(input_audio, return_tensors="pt", padding=True).input_values

# retrieve logits
logits = model(input_values).logits

tokens = torch.argmax(logits, axis=-1)

# decode using n-gram
transcription = tokenizer.batch_decode(tokens)

# print the output
print(transcription)

Output: قالت ليا هاد السيد هادا ما كاينش بحالو

email: souregh@gmail.com

BOUMEHDI Ahmed