How-To

How to Evaluate Arabic Speech to Text on Your Own Audio (With Python Code)

Evaluate Arabic speech to text on your own audio, Python scoring code showing raw and normalised word error rate
On this page
  1. Why Should You Evaluate Arabic Speech to Text on Your Own Audio?
  2. What Do WER and CER Measure for Arabic?
  3. How Do You Build an Arabic Test Set That Reflects Your Users?
  4. Write references to a style guide
  5. Why Must You Normalise Arabic Text Before Scoring?
  6. How Do You Transcribe the Test Set With Munsit’s API?
  7. How Do You Calculate Arabic WER and CER in Python?
  8. How Do You Check Names, Numbers and English Terms Separately?
  9. How Do You Know if One System Is Really Better?
  10. What Is a Good WER for Arabic Speech to Text?
  11. How Does Munsit Fit Into Your Arabic Evaluation?
  12. Disclaimers

Public Arabic speech recognition scores rarely tell you how a system will perform on your calls, meetings or videos. Dialect audio is still hard: in the NADI 2026 shared task on multidialectal Arabic speech, the best robust ASR entry scored 43.24% word error rate, and the Bulbul dialectal Arabic dataset paper reports a best mean WER of 41.7 on dialectal speech, with much better results on standard Arabic. On top of that, the same transcript can score very differently depending on how Arabic spelling is handled. Teams that pick a vendor from a leaderboard or a demo often discover the gap only after launch.

Munsit makes testing on your own audio straightforward. Its Arabic speech to text API covers 25+ dialects with no dialect parameter to set, accepts a file in a single request, and starts with free credits on signup with no card needed. This guide gives you the full method and tested Python code to build a test set, normalise Arabic text, score WER and CER, check names and numbers, and decide whether one system is really better than another.

Why Should You Evaluate Arabic Speech to Text on Your Own Audio?

Because accuracy depends on the audio. Dialect, recording channel, background noise, speaking style and vocabulary all change results, and public benchmarks are built from datasets that rarely match your users. A test on 1 to 3 hours of your own audio is the only reliable way to choose.

Open benchmarks are still useful for a shortlist. The Open Universal Arabic ASR Leaderboard from ELM in Saudi Arabia evaluates open models across several multidialect datasets, and the authors built it because earlier evaluations often covered only one or two dialects. Your product, though, may serve Saudi callers on 8 kHz phone lines or Emirati managers in meeting rooms switching to English mid sentence. Those conditions are what you need to measure.

What differs from public benchmarksExample in your productEffect on accuracy
Dialect mixGulf, Egyptian and Levantine speakers in one queueErrors on dialect words that standard models miss
Recording channelPhone calls at 8 kHz, laptop microphones, meeting roomsCompressed or distant audio loses detail
Code switchingArabic sentences with English product namesEnglish terms written as Arabic words or dropped
VocabularyBrand, product, place and staff namesNames wrong even when the rest is right
Speaking styleFast, overlapping, informal speechMissed and merged words

What Do WER and CER Measure for Arabic?

Word error rate (WER) counts substituted, deleted and inserted words as a share of the words in the reference. Character error rate (CER) does the same at character level. For Arabic, report both: WER shows readability, while CER is more forgiving of attached prefixes and spelling variants.

MetricWhat it tells youWhen it matters most
WERHow many words a reader would see as wrongCaptions, meeting notes, search, anything people read
CERHow close the letters are, even when a word is not exactArabic with clitics and spelling variants; comparing close systems
Term recallWhether names, numbers and key terms are written correctlyCall centres, CRM notes, compliance and analytics

The Almieyar multidialect Arabic benchmark notes that CER is particularly informative for Arabic because of its morphology and attached words. Our article on WER vs CER for Arabic speech recognition explains the metrics in more depth; this guide focuses on running them.

How Do You Build an Arabic Test Set That Reflects Your Users?

Collect at least 100 clips, ideally 1 to 3 hours, sampled from the dialects, channels and topics your product handles. Label each clip with a slice name, and have native speakers write reference transcripts that follow one written style guide.

Six steps to evaluate Arabic speech to text: sample, reference, transcribe, normalise, score, decide

The full evaluation workflow.

SliceWhat to includeWhy
DialectEach dialect your users speak, in roughly the actual mixShows where a system is weak
ChannelPhone, laptop, mobile and meeting room recordingsCompressed or distant audio behaves differently
Code switchingClips where speakers mix Arabic and EnglishTests how English terms are written
Domain termsClips full of product names, places and numbersFeeds the term recall check
Hard audioNoise, overlap, fast speechShows the floor, not just the average

Write references to a style guide

Two people transcribing the same clip will disagree on spelling, numbers and English words unless they follow the same rules. Decide before you start: whether numbers are written as digits, whether English terms are written in Latin letters, how dialect words are spelled, and whether fillers are kept. Have a second native speaker check every reference. Keep the clips short, 5 to 30 seconds each, so errors are easy to trace.

Store everything in one CSV with the columns file, slice and reference, and the audio files in a folder named audio. If your test audio is confidential, keep it inside your own environment throughout.

Why Must You Normalise Arabic Text Before Scoring?

Because Arabic allows several correct spellings of the same word. Without normalisation, differences in hamza, taa marbuta, alef forms, diacritics and digits count as errors, and you end up measuring spelling conventions instead of recognition.

The same correct Arabic transcript scores 71.4 percent word error rate raw and 0 percent after Arabic normalisation

Normalisation changes the score, not the transcript.

We tested this with the code below: a reference and a system output that a reader would see as the same sentence scored 71.4% WER raw and 0% after normalisation. Research benchmarks apply the same idea.

The Almieyar benchmark normalises by removing diacritics and tatweel, unifying alef and hamza variants, and normalising taa marbuta and alef maqsura, and a 2026 study on Saudi and Gulf Arabic speech recognition normalises text identically for every system it compares.

RuleExampleWhy
Remove diacritics (tashkeel)مُحَمَّد ← محمدMost systems and references omit them
Remove tatweelالـتـقـريـر ← التقريرDecorative stretch, not a letter
Unify alef formsأ إ آ ← اWriters use them inconsistently
Taa marbuta to haالساعة ← الساعهCommon informal spelling
Alef maqsura to yaعلى ← عليCommon informal spelling
Arabic digits to 0 to 9١٠ ← 10Systems output either form
Display forms to lettersﺳﻼﻡ ← سلامText copied from PDFs uses display codes
python
normalize.py
import re
import string
import unicodedata

def char_range(first, last):
    return "".join(chr(c) for c in range(first, last + 1))

TASHKEEL = char_range(0x0610, 0x061A) + char_range(0x064B, 0x065F) + chr(0x0670) + char_range(0x06D6, 0x06ED)
DIACRITICS = re.compile("[" + re.escape(TASHKEEL) + "]")
ALEF_FORMS = re.compile("[" + chr(0x0622) + chr(0x0623) + chr(0x0625) + chr(0x0671) + "]")
ARTICLE_BEFORE_LATIN = re.compile(r"\b" + chr(0x0627) + chr(0x0644) + r"\s+(?=[" + string.ascii_lowercase + "])")
DIGITS = {chr(base + i): str(i) for base in (0x0660, 0x06F0) for i in range(10)}

# Spellings you accept as the same word, filled in from your own error reviews
EQUIVALENTS = {}

def normalize_arabic(text):
    text = unicodedata.normalize("NFKC", text)          # display forms to standard letters
    text = DIACRITICS.sub("", text)                     # remove tashkeel
    text = text.replace(chr(0x0640), "")                # remove tatweel
    text = ALEF_FORMS.sub(chr(0x0627), text)            # unify alef forms
    text = text.replace(chr(0x0649), chr(0x064A))       # alef maqsura to ya
    text = text.replace(chr(0x0629), chr(0x0647))       # taa marbuta to ha
    text = "".join(DIGITS.get(ch, ch) for ch in text)   # Arabic digits to 0 to 9
    text = text.lower()                                 # English words in mixed speech
    text = re.sub(r"[^\w\s]", " ", text)                # Arabic and Latin punctuation
    text = ARTICLE_BEFORE_LATIN.sub("", text)           # article written before English words
    return " ".join(EQUIVALENTS.get(w, w) for w in text.split())

Two lines deserve a note. The article rule removes the Arabic article when it is written as a separate word before an English term, so a reference and an output that differ only there are not penalised. The EQUIVALENTS dictionary is where you add spellings your team accepts as the same word, for example a transliterated English term written in Arabic letters mapped to the English word. Fill it from your error reviews, and apply the same file to every system. A 2026 benchmark of commercial systems on code switched speech points out that orthographic variants a production system would treat as identical are penalised by WER when they are not canonicalised.

How Do You Transcribe the Test Set With Munsit’s API?

Send each audio file to the transcription endpoint with your API key and save the returned text next to the reference. The script below uses only Munsit’s documented first call: a POST to /audio/transcribe with the file and your API key in the request header.

python
transcribe.py
import csv, os, pathlib
import requests

API = "https://api.munsit.com/api/v1/audio/transcribe"
KEY = os.environ["MUNSIT_API_KEY"]

with open("test_set.csv", encoding="utf8") as f, open("results.csv", "w", newline="", encoding="utf8") as out:
    writer = csv.writer(out)
    writer.writerow(["file", "slice", "reference", "hypothesis"])
    for row in csv.DictReader(f):                 # columns: file, slice, reference
        with open(pathlib.Path("audio") / row["file"], "rb") as audio:
            r = requests.post(API, headers={"x-api-key": KEY}, files={"file": audio}, timeout=300)
        r.raise_for_status()
        writer.writerow([row["file"], row["slice"], row["reference"], r.json()["transcription"]])

Set your key as the environment variable MUNSIT_API_KEY before running it. Run every other system you are testing through the same files and save its output in the same format, so the scoring step treats them identically. Check the Arabic speech to text API guide for developers for request options beyond this minimal call.

How Do You Calculate Arabic WER and CER in Python?

Normalise every reference and output with the same function, then pass the lists to jiwer, an open source Python library for WER and CER. Report the corpus score and a score for each slice, so a strong average cannot hide a weak dialect or channel.

python
score.py
import csv
import jiwer
from normalize import normalize_arabic

refs, hyps, slices = [], [], []
with open("results.csv", encoding="utf8") as f:
    for row in csv.DictReader(f):               # columns: file, slice, reference, hypothesis
        refs.append(normalize_arabic(row["reference"]))
        hyps.append(normalize_arabic(row["hypothesis"]))
        slices.append(row["slice"])

overall = jiwer.process_words(refs, hyps)
print(f"Corpus WER: {overall.wer:.1%}  CER: {jiwer.cer(refs, hyps):.1%}")
print(f"Substitutions {overall.substitutions}, deletions {overall.deletions}, insertions {overall.insertions}")

for name in sorted(set(slices)):
    r = [x for x, s in zip(refs, slices) if s == name]
    h = [x for x, s in zip(hyps, slices) if s == name]
    print(f"{name:<14} WER {jiwer.wer(r, h):.1%}  CER {jiwer.cer(r, h):.1%}  ({len(r)} clips)")

Install the library with pip install jiwer; it is published on PyPI as jiwer. The script reports corpus level WER, meaning total errors over total reference words, which weights long clips more. The Saudi and Gulf Arabic study reports both per utterance averages and corpus level WER; if your clips vary a lot in length, compute both and say which one you use.

Output lineWhat it meansWhat to do with it
Corpus WER and CEROverall accuracy on your test setCompare systems on the same normaliser
Substitutions, deletions, insertionsWhat kind of errors dominateMany deletions often mean noise or fast speech
Per slice WERAccuracy for each dialect, channel or topicFind the slice that will hurt your users most

How Do You Check Names, Numbers and English Terms Separately?

List the terms that must be right, such as product names, places, staff names and amounts, and measure how often each one appears correctly in the output when it appears in the reference. A system with a slightly worse WER can still be the better choice if it gets these right.

python
terms.py
from normalize import normalize_arabic

def term_recall(refs, hyps, terms):
    """For each must have term, the share of clips containing it where the system also wrote it."""
    report = {}
    for term in terms:
        t = normalize_arabic(term)
        clips = [(r, h) for r, h in zip(refs, hyps) if t in normalize_arabic(r)]
        if clips:
            found = sum(t in normalize_arabic(h) for _, h in clips)
            report[term] = (found, len(clips))
    return report

The function returns, for each term, how many clips contained it and how many outputs wrote it correctly. It matches text inside words, so check short numbers by hand, since 10 also appears inside 100. In our sample run, the English word launch was found in the one clip that contained it, while budget was written as a transliterated Arabic word, which is exactly what the EQUIVALENTS dictionary is for once your team decides how to count it.

How Do You Know if One System Is Really Better?

Resample your clips many times and count how often system A beats system B. If A wins in at least 95% of resamples, the gap is unlikely to be chance; if not, collect more audio before deciding.

python
compare.py
import random
import jiwer

def bootstrap_wer_gap(refs, hyps_a, hyps_b, rounds=2000, seed=7):
    """Share of resamples in which system A has a lower WER than system B."""
    rng = random.Random(seed)
    idx = list(range(len(refs)))
    wins = 0
    for _ in range(rounds):
        s = [rng.choice(idx) for _ in idx]
        r = [refs[i] for i in s]
        a = jiwer.wer(r, [hyps_a[i] for i in s])
        b = jiwer.wer(r, [hyps_b[i] for i in s])
        wins += a < b
    return wins / rounds

Pass the normalised references and the two systems’ normalised outputs. A small test set can make a 1 point WER gap look meaningful when it is not, which is why this check matters more than the headline number. If the result is close, look at per slice scores and term recall, then decide on the factors that matter for your product, such as latency for live use. Our article on streaming versus batch transcription covers that trade off.

What Is a Good WER for Arabic Speech to Text?

There is no single good number; it depends on the audio and on what the text is used for. Dialect benchmarks still show WER above 40% for hard conversational audio, so compare systems on your own test set and set a target based on how the transcript will be used.

Use of the transcriptSuggested targetWhy
Captions people readLow WER and very high term recallEvery visible error is noticed
Meeting notes and summariesModerate WER, high term recallSummaries tolerate small errors but not wrong names
Call analytics and searchModerate WERTrends survive some word errors
Compliance and legal recordsLowest achievable, plus human reviewExact wording carries weight

These targets are guidance written for this article. Set your own thresholds after reviewing a sample of errors with the people who will use the transcripts. For call centre audio specifically, see our guide to Arabic speech to text for call centers.

How Does Munsit Fit Into Your Arabic Evaluation?

Munsit is easy to include in a fair test: one API key, one request per file, 25+ dialects with no dialect parameter, and free credits on signup with no card needed. You can also run it on your own servers, which lets you evaluate on confidential audio without it leaving your network.

Evaluation needMunsit featureWhy it helps
Mixed dialect audioArabic speech to text, 25+ dialectsNo dialect parameter to set per clip
Quick startFree credits on signup, no cardRun your test set before talking to sales
Live use casesStreaming WebSocket transcriptionTest latency and accuracy together
Meetings and callsSpeaker diarizationCheck who said what as well as what was said
Noisy recordingsVoice isolationTest whether cleaning audio first improves results
Confidential audioSelf hosting on your own serversEvaluate without sending audio outside your network

Learn more about the model on the Munsit speech to text page, see why dialects matter in our article on Arabic dialect speech recognition, or compare options in our list of the best Arabic speech to text tools.

Disclaimers

  • All Python code in this article was run for this article with jiwer and Python 3. The Munsit request uses only the documented /audio/transcribe call with the API key header; check the Munsit documentation for additional options.
  • The 71.4% and 0% WER figures come from a single example sentence written for this article and show the effect of normalisation, not the accuracy of any system.
  • Benchmark figures come from the cited NADI 2026, Bulbul, Almieyar and Open Universal Arabic ASR Leaderboard papers.
  • Munsit product details, including dialect coverage, streaming, diarization, voice isolation, free credits and self hosting, come from Munsit documentation in November 2026, and may change.
  • Test set sizes, targets and thresholds are guidance written for this article. Adjust them to your audio and use case.

Frequently asked questions

How do I evaluate an Arabic speech recognition model on my own audio?

To evaluate Arabic speech recognition on your own audio, collect at least 100 clips that match your users’ dialects and channels, have native speakers write reference transcripts to one style guide, run every system on the same files, normalise Arabic text the same way for all systems, and compare WER, CER and term recall per slice.

Why do I need to normalise Arabic text before calculating WER?

Arabic text needs normalisation before calculating WER because the same word can be written correctly in several ways, with differences in hamza, alef forms, taa marbuta, diacritics and digits; without it, a correct transcript can score 71.4% WER, as in the example in this article.

Should I use WER or CER for Arabic?

Arabic evaluations should report both WER and CER, since WER reflects how many words a reader sees as wrong while CER is more forgiving of attached prefixes and spelling variants that are common in Arabic.

How many audio clips do I need to test Arabic speech to text?

A useful Arabic speech to text test uses at least 100 clips, ideally 1 to 3 hours of audio, spread across the dialects, recording channels and topics the product handles, with enough clips in each slice to compare systems per slice.

How do I calculate WER in Python for Arabic?

WER for Arabic can be calculated in Python by normalising references and outputs with the same Arabic normalisation function and passing both lists to the open source jiwer library, which returns WER, CER and counts of substitutions, deletions and insertions.

What is a good word error rate for Arabic speech recognition?

There is no single good word error rate for Arabic because results depend heavily on dialect and audio quality; recent dialect benchmarks report WER above 40% for hard conversational audio, so teams should compare systems on their own test set and set targets by use case.

How do I know if one Arabic ASR system is really better than another?

One Arabic ASR system can be considered better when a bootstrap test that resamples the test clips shows it achieving lower WER in at least 95% of resamples; smaller gaps on small test sets are often chance.

Can I test Munsit’s Arabic speech to text for free?

Munsit gives free credits on signup with no card needed, so developers can run their own Arabic test set through the speech to text API before deciding.

ShareLinkedInXWhatsApp