A voice-enabled mini assistant that understands Kinyarwanda and responds
# 🗣️ Kinyarwanda Voice Assistant – "KinyaWhisper"
A voice-enabled mini assistant that understands **Kinyarwanda** and responds , designed to simulate how intelligent humanoid robots interact with humans in local languages. Built from scratch using ASR (Whisper), NLP, and TTS (pyttsx3), this project showcases the potential of AI for localized voice interaction.
---
## 🎯 Project Summary
This project was developed as part of an **Intelligent Robotics** assignment to build a simple voice assistant for Kinyarwanda speakers. It includes:
- 🎤 **Automatic Speech Recognition (ASR)**: Fine-tuned Whisper model on a custom Kinyarwanda dataset.
- 🧠 **Natural Language Processing (NLP)**: Rule-based question-answer matching with fuzzy logic.
- 🗣️ **Text-to-Speech (TTS)**: Voice responses using the `pyttsx3` library.
---
## 📁 Folder Structure
```
.
├── audio/ # 44 custom audio samples (Kinyarwanda)
├── dataset.jsonl # Metadata: audio path + transcription
├── kinya-whisper-model/ # Fine-tuned Whisper model output
├── train.py # Whisper training script
├── inference.py # Batch transcription script
├── main.py # Batch voice assistant (NLP + TTS)
├── bach_main.py # CLI: record + respond to live audio
├── transcriptions.txt # Output transcriptions
├── README.md # Project documentation
```
---
## 🚀 How It Works
1. **ASR**: User speaks or loads audio → Whisper model transcribes it.
2. **NLP**: Assistant uses exact/fuzzy matching to map transcription to predefined answers.
3. **TTS**: Assistant speaks the matched answer aloud.
---
## 🛠️ Technologies Used
- **Python 3.10+**
- **OpenAI Whisper (fine-tuned)**
- **Transformers (Hugging Face)**
- **Torchaudio**
- **Pyttsx3** (offline TTS)
- **Difflib** for fuzzy matching
- **Sounddevice** for live mic input (CLI mode)
---
## 🧠 Training Details
- Dataset: 44-word Kinyarwanda dataset built using BearAudioTool
- Model: Fine-tuned …