Moroccan Darija speech recognition

Lmaana 2.4

Darija transcription
107× real-time compute throughput.

Lmaana 2.4 used the least compute and had the lowest character error rate of four configurations on the 3-hour Darija benchmark.

Darija Speech Lab Lmaana logo, a blue hexagon around an audio waveform

3-hour benchmark

Lmaana 2.4 leads on speed and character error rate

Four configurations on 1,731 human-labeled MoulSot-Full clips · NVIDIA RTX 5070 Ti, 16 GB · 28 November 2026

Compute per audio minute
0.56 s
Throughput vs. next fastest
2.4×
Lowest character error rate
11.65%

Compute time

Seconds of compute per minute of audio. Lower is better.

  1. Lmaana 2.40.56 s
  2. MoulSot v0.31.33 s
  3. fihrIA-ASR-1.7B6.69 s
  4. Voxtral Mini 4B RT40.07 s

Lmaana delivered about 2.4× the compute throughput of MoulSot v0.3, the next-fastest tested configuration.

Compute throughput

At 0.56 seconds of compute per audio minute, Lmaana ran at about 107× real time, corresponding to a real-time factor of 0.0093. Batch sizes and runtimes varied across the tested configurations.

Character error rate

Lmaana’s CER was 0.76 percentage points below the next-best result. It also had the lowest CER after additional spelling normalization, at 11.26%.

100 hours processed in about 67 minutes of GPU computeSeparate run on 62,157 unlabeled clips.

Full results and confidence intervals

Corpus error rates use base normalization. The 95% intervals come from 1,000 resamples of clips. The orthographic columns apply additional Arabic spelling rules.

ModelCompute / minCER (95% CI)WER (95% CI)Ortho CEROrtho WERMedian clip CERExact matchesPeak VRAM
Lmaana 2.40.56 s11.65% 11.21–12.1536.82% 36.04–37.6811.26%35.36%10.0%5.5%6.1 GB
MoulSot v0.31.33 s12.94% 12.42–13.5436.11% 35.25–37.0112.50%34.57%10.6%7.9%5.0 GB
fihrIA-ASR-1.7B6.69 s12.45% 11.96–13.0132.63% 31.76–33.5012.04%31.09%10.3%7.0%4.3 GB
Voxtral Mini 4B RT40.07 s12.41% 11.88–12.9735.12% 34.27–36.0011.98%33.61%10.0%7.6%8.5 GB

Exact-match rate is the share of clips whose entire normalized transcript matches the reference.

Results by script and clip length

Corpus CER within each group. The duration groups can overlap the script groups.

Clip groupClipsLmaanaMoulSotfihrIAVoxtral
Reference contains Latin-script French or English17315.9%18.5%14.5%17.0%
Arabic-script-only reference1,55811.1%12.2%12.2%11.8%
Shorter than 3 seconds49313.3%14.3%18.6%14.0%
9 seconds or longer53811.2%12.6%11.2%11.7%

The script groups use the writing in the reference. An Arabic-script reference can still contain loanwords or code-switching. On the longest clips shown, Lmaana and fihrIA tied at the precision reported.

Language context

What makes Darija hard to transcribe?

Spoken Darija varies across speakers. A single sentence can switch between Moroccan Arabic and French, while written references can follow different spelling conventions.

An illustrative utterance introduces the French phrase le fichier between Darija words. The diagram compares two transcript conventions for the same spoken phrase.
Example of Darija–French code-switching. Different ways of writing the same phrase can change the error count.

Speech and spelling vary independently

Regional pronunciation and borrowed words change the acoustic recognition problem. Spelling, script choice and where an annotator puts a space change how a recognized phrase is scored. For example, le fichier and l-fichier are two versus one whitespace-delimited words.

Latin script is a test slice

The benchmark groups clips by the presence of Latin characters in the reference. A French loanword written in Arabic script can fall outside that group. Interpret the slice as performance under a writing convention and see the scoring protocol for its normalization rules.

Architecture

Why Lmaana is fast

The encoder processes the audio into contextual frames. CTC scores the frames in parallel and a greedy decoder turns the resulting token path into text.

Simplified OmniASR pipeline from 16 kHz waveform through convolution, Transformer encoder and CTC token scores, with separate branches for training and inference.
OmniASR CTC pipeline. Convolutions reduce the number of time steps, the Transformer adds acoustic context, and the CTC head scores tokens and the blank class at each output frame.
  1. Downsample the waveform

    The upstream pipeline prepares normalized 16 kHz mono audio. The wav2vec 2.0-style convolutional front-end reduces the time axis by a factor of about 320, yielding roughly 50 encoder steps per second.

  2. Compute contextual scores

    The Transformer produces a 2,048-dimensional vector per step in the 3B model. A linear CTC head maps each vector to logits over output classes, including the blank. Stacking those scores gives a time-by-class matrix.

  3. Collapse the greedy path

    Greedy decoding takes the highest-scoring class at each step. It merges adjacent copies of the same token, drops blanks, and turns the remaining IDs into text with the OmniASR written tokenizer v2.

Where the speed comes from

Encoder states can use surrounding audio context. CTC reduces sequential work after encoding. The head scores the whole sequence of frames in one forward pass, and greedy inference can choose tokens without feedback from previously emitted text. An autoregressive decoder generates one token at a time, with each choice conditioned on the text generated so far.

The approximately 20 ms step is the spacing between encoder frames. Full-clip encoding, audio decoding, batching and device transfers can all affect end-to-end latency. The benchmark compares complete configurations, so its speed ratios combine architecture with implementation choices.

Connectionist Temporal Classification

From frame scores to text

Training can use a transcript without token timestamps. The model assigns probabilities to many plausible alignments between the same audio and text.

Training sums the valid alignments

Let x be the audio, y the reference tokens and π a path with one label per encoder step. The collapse function B merges adjacent repeats before dropping blanks. All paths that satisfy B(π) = y contribute to the reference probability.

Probability of one path
P(π | x) = ∏ₜ Pₜ(πₜ | x)
Probability of the transcript
P(y | x) = ∑π : B(π) = y P(π | x)
Training loss
−log P(y | x)

Forward–backward computes the sum on a grid of encoder steps and target positions, without enumerating every path. The state sequence inserts blanks between target tokens and at both ends. A path can stay in place or advance, and can skip an intervening blank between distinct target tokens. This gives O(TU) time for T encoder steps and U target tokens.

Illustrative CTC token probabilities over four time steps. Greedy collapse yields ab. Multiple frame paths contribute to the probability of the reference ab during training.
Illustrative CTC example with tokens a and b. A blank can separate identical tokens, so L, blank, L collapses to LL.

Inference collapses one greedy path

This example starts with one selected symbol per frame. The blank between the two Ls keeps both after collapse. Adjacent H H and O O each become one token.

Merge adjacent repeats
_ H E L _ L O _
Drop blanks
HELLO
When greedy decoding can miss the best transcript

In this two-frame example, the blank wins each frame with probability 0.55. The empty transcript has probability 0.3025. Three paths produce A with a combined probability of 0.6975, so A is the best sequence even though the greedy path returns an empty string. Beam search can explore alternatives at extra decoding cost.

A two-frame example where greedy decoding yields an empty transcript with probability 0.3025. Summing three other paths yields A with probability 0.6975.
Illustrative comparison of greedy path selection and sequence-level CTC decoding.

Data and model release

Adapting OmniASR to Darija

Lmaana 2.4 adapts Meta’s OmniASR CTC 3B v2 to Moroccan Darija. The final continuation updates the entire model and keeps the written tokenizer and greedy CTC decoder.

  1. Lmaana 2.2

    Fine-tuned OmniASR on Dataset13 clean v4, using about 264 hours of training audio. The release uses step_10000.

  2. Lmaana 2.3

    Introduced mixed-corpus adaptation with Dataset13 and corrected MoulSot. The project write-up identifies step_1500 as the checkpoint carried forward.

  3. Lmaana 2.4

    Continued full-model CTC training with the same mix. The sampler targets 80% Dataset13 examples and 20% corrected MoulSot examples by draw count. The release uses step_4500.

Model-card overview of the Lmaana 2.2 lineage, mixed-corpus fine-tuning and Lmaana 2.4 greedy CTC inference.
The model-card overview starts from the 2.2 lineage. The training write-up identifies Lmaana 2.3 at step 1,500 as the starting checkpoint for the final continuation.

How step 4,500 was selected

The project ranked checkpoints by word error rate on the private Dataset13 validation set and used corrected MoulSot validation as a second check. Both sources identify step 4,500 as the release and report 35.27% MoulSot validation WER. The team ran the held-out tests after selecting the checkpoint.

Held-out results against Lmaana 2.2

The model cards use the same frozen test splits, normalization and greedy CTC decoder. From the unrounded scores, Lmaana 2.4 reduced WER by 0.37 percentage points on Dataset13 and 1.24 points on corrected MoulSot. The four-model comparison uses a separate 3-hour protocol.

Test setClips2.2 WER2.4 WER2.4 CER
Dataset13 clean v46,57638.48%38.11%16.16%
Corrected MoulSot1,95740.78%39.53%12.56%
Checkpoint access and training records

The release packages a native fairseq2 checkpoint at model/consolidated.pt, the written tokenizer, configuration files, metrics and a SHA256SUMS file. Request access on the model card to download the gated weights. Use the fairseq2/OmniASR runtime and verify the checksum before loading the checkpoint.

The project write-up describes the final continuation from 2.3 with a fresh optimizer and a learning rate of 5e-7. It reports a planned 5,000 local steps, a stop at step 4,750 and 37.7604% Dataset13 validation WER at the selected step. The model card summarizes the adaptation with 2e-6, 2,000 steps and 37.9410% Dataset13 validation WER. The sources give matching held-out test results. Record which training recipe and validation run you are reproducing.

Separate 100-hour run

Batch transcription at scale

Lmaana generated draft transcriptions for 62,157 clips from MoulSot-Full extra-gt-2.5 with zero failed or empty outputs. The pipeline used unlabelled audio to measure throughput and completion.

GPU compute time
~67 min
Compute / audio minute
0.675 s
Peak GPU memory
6.25 GB
Which audio was processed and what agreement tells us

The execution report records 53 of 242 source shards read. The pipeline excluded clips under three seconds and exact audio duplicates, among other quality checks. The accepted clips ranged from 3.0 to 20.4 seconds and averaged 5.8 seconds.

The execution report compares Lmaana and fihrIA on their first 50 shared hours, where median between-model CER was 8.8%. The dataset card reports the completed comparison across the same 62,157 clips for both models, with 7.7% median between-model CER. Both comparisons measure agreement between machine outputs. The benchmark release publishes the separate 3-hour test with human references and summarizes the larger run in aggregate.

Runtime and outputs to retain

The execution used an RTX 5070 Ti (16 GB), Ubuntu 24.04 under WSL2, fairseq2 0.6 and PyTorch 2.8.0 with CUDA 12.8. Record the ordered clip manifest and model revision, and verify the downloaded checkpoint by SHA-256. The run indexed 62,157 unique clip IDs across the manifest, Parquet and JSONL exports, and the SQLite state used for resuming. Keep the quality report and model stats alongside these outputs to audit filtering, timing and GPU memory.

Evaluation protocol

How to read these results

Clips and runtime

The evaluation took the first 1,731 clips with nonempty human references from MoulSot-Full 100-gt-2.5/test, skipping 27 empty references. The selected clips total 3.00 hours and range from 0.3 to 12 seconds, with a mean of 6.2 seconds. All four configurations processed the same clips, and Voxtral emitted 15 empty hypotheses.

The tests shared one RTX 5070 Ti (16 GB). Lmaana used native fairseq2 in WSL2. fihrIA and MoulSot ran in batches of 16, while Voxtral ran one clip at a time. The comparison reflects the complete combinations of models, batching and runtimes.

Real-time factor (RTF) divides compute seconds by audio seconds. For a rate reported per audio minute, RTF = rate ÷ 60, and the real-time multiple is its reciprocal. Speed ratios between configurations divide their per-minute compute times. End-to-end processing and streaming latency require separate measurement.

Scoring and normalization

After normalizing both texts, align each hypothesis with its reference and count substitutions, deletions and insertions. Corpus CER sums those edits at the character level and divides by total reference characters. WER uses the same calculation at the word level. Summing before dividing gives longer references greater weight than a simple average of clip error rates.

Base scoring applies Unicode NFKC, lowercases text, and removes diacritics and punctuation. The orthographic variant also folds alef variants, alef maqsura and ta marbuta, and removes tatweel. The reference أهلا and hypothesis اهلا differ by one of four characters. That single substitution changes the only word, giving 25% CER and 100% WER before the extra alef rule. Both rates become 0% after it.

The report used 1,000 bootstrap resamples of clips to estimate 95% intervals. Lmaana led CER in all reported resamples, even though some individual model intervals overlap. Those resamples quantify variation within this selection of clips. The benchmark reported text agreement under these rules, and semantic error rate was outside its results.

Scope and limitations

The sample uses the first eligible clips, so it reflects the ordering of this test split. Some systems used MoulSot data for training or adaptation, and the benchmark report flags possible training overlap. Those factors limit the evidence for generalization across independent sources, longer recordings and regional accents.

Batch size, clip duration, software and hardware can shift the speed ranking. The four-way test compares configurations as run and leaves the individual impact of architecture, batching and runtime unmeasured.

Reproducing the comparison

The benchmark report identifies build_eval_set.py for selecting the three-hour set, run_eval_models.ps1 for running the systems, and score_eval.py for scoring their outputs. For a matching comparison, keep the ordered clip IDs and references fixed and record each checkpoint, runtime and batch size. Retain empty hypotheses when scoring and preserve both scoring variants.

Documentation

Sources and credits

Project

Lmaana was developed as part of Badr Joulali’s internship at Morocco’s Ministère de l’Intelligence artificielle, de la Transformation numérique et de la Réforme de l’Administration.

Collaborator Abderrahman Skiredj

Badr Joulali’s project announcement

Benchmark and execution reports

The 3-hour results and runtime configuration come from the 28 November 2026 benchmark report. The 100-hour run comes from the November 2026 Darija pseudo-labeling execution report.

Technical diagram