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 β¦