Part of the project Speech recognition for code-switched Sesotho and English · code

Written in November 2026, looking back at an evaluation I ran in September 2025. The post is dated to when the work was done.

Listen to people talk in Maseru or Soweto and you will hear sentences like “well ho bonolo ho sebedisa information”: Sesotho with English words dropped in where they are handy. Linguists call this code-switching. For hundreds of millions of people across Africa it is simply how everyday speech works.

Speech recognition systems are mostly not built for it. They are trained on one language at a time, usually English, and they expect the speaker to stay in that language. I wanted to see what that looks like in practice.

The question

The scenario was a practical one. An organisation wants a mobile app that transcribes, and later translates, spoken Sesotho for people in Lesotho, including older people, young people and people who cannot read or write. Those users will mix Sesotho and English freely. Before building anything, it helps to know how far existing models get you out of the box.

What I tested

The data. 97 short clips of Sesotho–English speech, taken from South African television soap operas. They come from the code-switched soap-opera corpus built at Stellenbosch University (van der Westhuizen & Niesler, LREC 2018), which has since grown into a larger 50-hour collection. The clips are short: about two seconds on average, from under one second to just over six.

The models. Two widely used open models, run with no extra training:

So neither model was ever taught Sesotho. That was the point: this is what a developer gets if they pick up a popular model and hope for the best.

The measures. Word error rate (WER) counts the words a model gets wrong, as a share of the words actually spoken. Character error rate (CER) does the same for individual letters, which gives credit for near misses. For both, lower is better, and 1.0 means as many errors as there were words or letters.

What I found

Bar charts. Left: word error rate 0.89 for Whisper-small and 0.87 for Wav2Vec2; character error rate 0.68 and 0.53. Right: Wav2Vec2 word error rate of 0.86 on English words and 1.57 on Sesotho words.
Left: overall error rates for both models. Right: the English-only model's errors split by the language of each word.

1. Both models got roughly nine words in ten wrong. Whisper-small had a word error rate of 0.89 and Wav2Vec2 0.87. A paired statistical test found no meaningful difference between them at the word level (p = 0.33). Neither is usable as it stands.

2. At the letter level, the English-only model did better. Wav2Vec2’s character error rate was 0.53 against Whisper’s 0.68, and that gap was clear (p < 0.001). Wav2Vec2 spells out what it hears letter by letter, so it often lands close to the sound even when the word is wrong. Whisper tends to replace what it hears with whole, plausible-looking words, which can drift further from what was said.

3. Sesotho words were where things fell apart. Splitting the English-only model’s errors by the language of each word, it had an error rate of 0.86 on English words and 1.57 on Sesotho words. A rate above 1.0 means the model produced more mistakes than there were Sesotho words, by splitting them up and inventing extra words around them. (Word language was tagged with a simple rule, so treat the exact figures as indicative.)

4. Most errors were missing letters, not wrong ones. The most common mistakes were dropped characters: missing spaces between words and dropped vowels (e, a, o). The most common swap was e heard as i. That pattern fits a model trained on English sound patterns meeting a language with a different vowel system and different ways of joining words.

5. Short clips were the hardest. Clips under two seconds, which were over half the set, had the highest error rate (0.93 for Wav2Vec2) against about 0.81 for clips of two to four seconds. Very short clips give a model little context to work with, which matches what the corpus authors later found: dropping utterances under one second noticeably improved results. Loudness, by contrast, made no clear difference.

6. For Whisper, how you decode matters a lot. With a wider beam search (keeping five candidate transcripts in play instead of one), Whisper’s word error rate was 0.88. With plain greedy decoding it rose to 1.22. Adding randomness (temperature 0.3) made it worse. If you use Whisper on hard audio, these settings are not a detail.

What the model actually heard

Five examples of spoken Sesotho-English sentences next to the English-only model's transcriptions, which are mostly English-sounding nonsense.
Some of the worst cases. The model hears English-shaped sounds and forces them into English-looking words.

These examples show the problem more clearly than any number. “keng eo u leng sorry ka eona reneilwe” became “king olinsorigernorni”. The model is not lazy. It is doing what it was trained to do: map every sound onto the closest English spelling. Where the speaker uses an English word, it sometimes catches it (sorry, about). Where they use Sesotho, it has nothing to map to.

What this means for building speech tools for African languages

Off-the-shelf models are a starting point, not a product. For a Sesotho app, I would take these steps:

  1. Start from a model that has heard many languages. A multilingual base such as XLS-R, fine-tuned on Sesotho and code-switched speech, rather than an English-only model.
  2. Add a language model that knows how people really talk. A small text model trained on code-switched Sesotho–English, used when decoding, so the system expects information to appear inside a Sesotho sentence.
  3. Agree on how to write mixed speech. Code-switched text has no fixed spelling conventions, so transcripts need consistent rules before errors can be measured fairly.
  4. Report results by slice. Short versus long clips, Sesotho versus English words, different speakers, with confidence intervals, because the average hides where the system fails.
  5. Collect more, and more varied, audio. Soap-opera speech is a good start, but real users will speak in noisy streets, on cheap phones, and at every age.
  6. Keep people in the loop. I flagged the clips with the worst errors as a set for human review, so corrections can flow back into training.

There is also a practical constraint. Whisper-small is about 244 MB and runs in compressed form on a mid-range phone; the Wav2Vec2 model is around 1.2 GB. For users who may have limited data or connectivity, a small model that works offline matters as much as accuracy. That is the kind of on-device AI we focus on at Kainetics Labs.

The bigger lesson is simple. When a speech model fails on code-switched speech, it is not because the speakers are doing something unusual. It is because the training data did not include how they speak. Fixing that is a data and design choice, and it is one worth making.


Code and results: Zikt/Lelapa-NLP-Lesotho-ASR-Task (notebook, evaluation scripts and the human-review set).

Acknowledgement: This evaluation began as a research task set by Lelapa AI, who kindly gave permission to use the data and share the results.

Further reading: van der Westhuizen & Niesler, A first South African corpus of multilingual code-switched soap opera speech (LREC 2018) · Radford et al., Robust Speech Recognition via Large-Scale Weak Supervision (Whisper) · Baevski et al., wav2vec 2.0.


Views here are my own and do not represent Carnegie Mellon University Africa, my collaborators or funders. Posts on health topics are for general information, not medical advice.

Cite this post

Thani, I. (2025, September 15). What speech models get wrong when people switch between Sesotho and English. Isaac Thani. https://zikt.github.io/research/2025/09/15/what-speech-models-get-wrong-sesotho-english/

@misc{thani2025whatspeechmodelsgetwrongsesotho,
  author       = {Thani, Isaac},
  title        = {What speech models get wrong when people switch between Sesotho and English},
  year         = {2025},
  month        = {sep},
  howpublished = {\url{https://zikt.github.io/research/2025/09/15/what-speech-models-get-wrong-sesotho-english/}},
  note         = {Blog post}
}
Share