First ever Luganda and Ugandan English dysarthric ASR models
# Uganda Dysarthric Speech Recognition
First-ever ASR models for Ugandan speakers with dysarthria — supporting both **Luganda** and **Ugandan English**.
Built for people with motor speech disorders (dysarthria) caused by neurological conditions like cerebral palsy, stroke, and Parkinson's disease.
## Results
| Model | Language | Architecture | WER |
|-------|----------|-------------|-----|
| whisper-ugandan-english-dysarthric-v8 | Ugandan English | Whisper-Small + LoRA | 32.13% |
| wav2vec2-luganda-dysarthric-v7 | Luganda | Wav2Vec2 + KenLM | **24.03%** |
Both models run **completely offline** on CPU or GPU.
## Repository Structure
```
├── english/
│ ├── train_v8_final.py # English Whisper LoRA training (32.13% WER)
│ └── augment_english.py # English dysarthric augmentation
├── luganda/
│ ├── train_luganda_wav2vec2_v6.py # Luganda v6 baseline (63.11% WER)
│ ├── train_luganda_wav2vec2_v7.py # Luganda v7 final (27.87% WER)
│ ├── augment_luganda_v2.py # 12-type aggressive augmentation
│ └── build_kenlm.sh # KenLM language model build script
├── inference/
│ ├── transcribe_luganda.py # Offline Luganda transcription
│ └── transcribe_english.py # Offline English transcription
└── README.md
```
## Quick Start
### Luganda (24.03% WER)
```python
from transformers import Wav2Vec2Processor, Wav2Vec2ForCTC
import torch, librosa
processor = Wav2Vec2Processor.from_pretrained("nugwa-mark/wav2vec2-luganda-dysarthric-v7")
model = Wav2Vec2ForCTC.from_pretrained("nugwa-mark/wav2vec2-luganda-dysarthric-v7")
audio, _ = librosa.load("speech.wav", sr=16000)
inputs = processor(audio, sampling_rate=16000, return_tensors="pt")
with torch.no_grad():
logits = model(**inputs).logits
print(processor.decode(torch.argmax(logits, dim=-1)[0]))
```
### Ugandan English (32.13% WER)
```python
from transformers import WhisperProcessor, WhisperForConditionalGeneration
from peft import PeftModel
import torch, librosa
base …