An Sesotho, Northern Sotho and Tswana -focused speech recognition model for research and academic use.
Stargate Africa's Hleba-0.24B is the Sesotho, Northern Sotho (Sepedi) and Tswana (Setswana) variant of the entry-level model in Stargate Africa's family of speech recognition models. Based on OpenAI's Whisper Small, it is designed to advance research into automatic speech recognition (ASR) for Sesotho, Tswana and Northern Sotho, with a particular focus on South African accents, speech patterns and language use.
The Stargate Africa speech recognition family aims to expand access to speech technology for South Africa's languages and communities. This initial release establishes a foundation for evaluating Sesotho, Tswana (Setswana) and Northern Sotho (Sepedi) speech recognition and developing more inclusive speech technologies tailored to the country's linguistic diversity.
Intended use: Research, academic study, experimentation, and evaluation.
Important: This model is intended for research and academic purposes. Commercial use requires separate authorization under the applicable model license. Please contact contact@stargateafrica.org for more capable models.
sot ts nsoNorthern Sotho (Sepedi) is one of South Africa's major languages. Approximately 6 million people speak it as their first language, making it the country's forth-largest home language by number of speakers. Roughly 5 million people speak Tswana (Setwsana) and Sesotho making them the fifth and sixth largest languages.
Tswana is an official language of South Africa and Zimbabwe. It is a lingua franca in Botswana and parts of South Africa, particularly North West Province
These figures describe approximate first-language speaker numbers, rather than everyone who can speak Sesotho, Sepedi or Setswana as an additional language.
| Property | Description |
|---|---|
| Model family | Hleba |
| Model identifier | Hleba-0.24B |
| Base model | OpenAI Whisper Small |
| Primary language | Sesotho Sepedi Setswana |
| Primary deployment region | South Africa |
| Task | Automatic speech recognition (ASR) |
| Intended audience | Researchers and academic users |
| Commercial use | Requires separate authorization under the applicable license |
The model should be evaluated against appropriate Sesotho, Sepedi and Setswana speech datasets to establish its recognition accuracy and limitations.
Control model: ggml-whisper-small.bin
Test model: ggml-Hleba-0.24B.bin
| Language | Utterances | Control WER | Test WER | Δ Test-Control |
|---|---|---|---|---|
| nso | 100 | 1.034 | 0.026 | -1.008 |
| sot | 95 | 1.169 | 0.659 | -0.510 |
| tsn | 98 | 1.126 | 0.594 | -0.531 |
The benchmark dataset is comprised of a 50/50 split between DSFSI and NCHLT test splits.
For help with PyWhisperCPP please visit https://github.com/absadiki/pywhispercpp
from pathlib import Path
from huggingface_hub import hf_hub_download
from pywhispercpp.model import Model
def main() -> None:
# Download the model from Hugging Face
model_path = hf_hub_download(
repo_id="StargateAfrica/Hleba-0.24B",
filename="ggml-Hleba-0.24B.bin",
)
# Validate the input audio
audio_path = Path("sot.wav")
if not audio_path.is_file():
raise FileNotFoundError(
f"Audio file not found: {audio_path.resolve()}"
)
# Load the Whisper-compatible model
model = Model(
model_path,
language="sot",
n_threads=8,
no_timestamps=True,
single_segment=True,
)
# Transcribe the audio
segments = model.transcribe(
str(audio_path),
language="sot",
n_threads=8,
)
# Print the combined transcription
transcription = " ".join(
segment.text.strip()
for segment in segments
if getattr(segment, "text", "").strip()
).strip()
print(transcription)
if __name__ == "__main__":
main()
Hleba-0.24B is intended to support research into Sesotho, Setwsana and Sepedi ASR and the development of speech technologies for South African users.
Potential research applications include:
Recognition performance may vary with accent, dialect, speaking rate, background noise, recording quality, code-switching and domain-specific vocabulary. Users should independently evaluate the model for their intended application.
This release should not be assumed to provide production-grade accuracy or to perform equally well across all Sesotho, Setwsana and Sepedi-speaking communities.
This model is released under apache-2.0 (apache-2.0).
The license governs permitted use, redistribution and other applicable conditions. Not intented for commercial use.
Please consult the license terms before using, adapting or redistributing the model.
openai/whisper-small