# Fine-Tuning Whisper (Medium) for Swahili ASR 🇹🇿🎙️
**Automatic Speech Recognition (ASR) adaptation using Mozilla Common Voice v17**
> **Project Type:** Small Machine Learning Experiment (Fine-tuning + Evaluation)
> **Model:** `openai/whisper-medium` (764M parameters)
> **Dataset:** Mozilla Common Voice 17.0 (Swahili)
> **Core Metrics:** Word Error Rate (WER), Real-Time Factor (RTF), Peak Memory
---
## 📌 Project Overview
This project presents an end-to-end machine learning experiment for fine-tuning OpenAI’s **Whisper-medium** model on the **Swahili** language using the **Mozilla Common Voice v17** dataset.
The goal is to improve Whisper’s transcription quality for Swahili speech by adapting the pretrained multilingual ASR model using supervised fine-tuning. The pipeline covers:
- Dataset loading and preprocessing
- Audio resampling and tokenization
- Fine-tuning Whisper using HuggingFace Trainer
- Evaluation using WER
- Inference and demonstration on test samples
- Reporting of latency and compute resource metrics (RTF and peak memory)
This repo is designed to be **reproducible**, **clean**, and **reviewer-friendly**.
---
## 🎯 Why This Project Matters
Swahili is one of Africa’s most spoken languages, yet it remains underrepresented in many speech recognition systems.
By fine-tuning Whisper on Swahili speech data, this work demonstrates how modern foundation models can be adapted to support low-resource languages, improving:
- accessibility tools (voice assistants, captioning)
- local language technology development
- speech-driven education systems
- inclusive AI systems for underrepresented communities
---
## 🧠 Model Description
Whisper is a multilingual encoder-decoder transformer model trained for speech recognition and translation.
- **Model used:** `openai/whisper-medium`
- **Parameters:** ~764 million
- **Architecture:** Transformer encoder-decoder
- **Framework:** HuggingFace Transformers
---
## 📂 Dataset
We use the **Swahili subset* …