Instructions to use nileagi/nileagi-sw-stt with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nileagi/nileagi-sw-stt with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("automatic-speech-recognition", model="nileagi/nileagi-sw-stt")# Load model directly from transformers import AutoProcessor, AutoModelForSpeechSeq2Seq processor = AutoProcessor.from_pretrained("nileagi/nileagi-sw-stt") model = AutoModelForSpeechSeq2Seq.from_pretrained("nileagi/nileagi-sw-stt", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Swahili STT
Authors: Zephania and Isack Odero
Swahili speech recognition. Input is Swahili audio; output is Swahili text.
This is not Sukuma ASR. For Sukuma speech, use nileagi/nileagi-suk-stt. For Swahili text → Sukuma text, use nileagi/nileagi-suk-mt.
| Companion voice | nileagi/nileagi-sw-tts |
| Collection | nileagi/nileagi-sw |
Demo
One short clip (24 kHz). The reference line is the text that was spoken.
| File | Reference (Swahili) |
|---|---|
samples/sample_01.wav |
Habari za asubuhi. Karibu kwenye sauti hii. |
from transformers import AutoModelForSpeechSeq2Seq, AutoProcessor
import soundfile as sf
repo = "nileagi/nileagi-sw-stt"
processor = AutoProcessor.from_pretrained(repo)
model = AutoModelForSpeechSeq2Seq.from_pretrained(repo)
audio, sr = sf.read("samples/sample_01.wav")
Prefer 16 kHz mono. Files longer than 25 seconds should be split; the NileAGI service on port 8094 does that.
Summary
| Task | Automatic speech recognition |
| Language | Swahili (sw) |
| Direction | Swahili speech → Swahili text |
| Selection | Internal bake-off on held-out local clips |
| Continue-trained on local audio | No |
| Primary metrics | WER, CER |
Evaluation
Held-out clips whose text matches the audio. The companion voice prompt is excluded. Scripture slices are excluded because their stored text does not match the audio.
| Source | n | WER | CER |
|---|---|---|---|
| Conversation | 24 | 13.1% | 2.9% |
| Narration | 8 | 26.5% | 5.3% |
A 64 second paragraph from the companion voice is read back at WER 9.5% and CER 5.4%.
How to use
HTTP API (port 8094):
curl -s -F file=@clip.wav http://127.0.0.1:8094/v1/transcribe
Library:
from transformers import AutoModelForSpeechSeq2Seq, AutoProcessor
processor = AutoProcessor.from_pretrained("nileagi/nileagi-sw-stt")
model = AutoModelForSpeechSeq2Seq.from_pretrained("nileagi/nileagi-sw-stt")
Intended use
- Research transcription of clear Swahili speech
- First hop of Swahili speech → Swahili text → Sukuma text
- Offline demos and teaching materials
Out of scope
- Sukuma or English ASR
- Legal, medical, or emergency transcripts
- Presenting a hypothesis as a human record without review
Limitations
- The selection set is 24 conversational clips plus 8 narration clips. It is not a public benchmark.
- Local scripture audio was not scored.
- A cut at 25 seconds can drop a word. Overlap decoding is not in this release.
- Rare names and spoken numbers may be respelled.
Related
- Voice:
nileagi/nileagi-sw-tts - Sukuma STT:
nileagi/nileagi-suk-stt - Swahili → Sukuma text:
nileagi/nileagi-suk-mt - Technical report:
TECHNICAL_REPORT.tex
License
Weights are redistributed under the MIT License that accompanied the selected public checkpoint. NileAGI evaluated and packaged the checkpoint. That MIT License, not a NileAGI share-alike licence, governs the weights.
See LICENSE and NOTICE.md.
Citation
@misc{nileagi-sw-stt-2026,
title = {Swahili speech-to-text},
author = {Zephania and Isack Odero},
year = {2026},
howpublished = {Hugging Face},
url = {https://huggingface.co/nileagi/nileagi-sw-stt},
note = {NileAGI}
}
- Downloads last month
- 27