This project is a Kinyarwanda voice assistant built for the Intelligent Robotics course assignment.
# Kinyarwanda Voice Assistant
A Kinyarwanda voice assistant built for the *Intelligent Robotics* course assignment.
It uses the `benax-rw/KinyaWhisper` model for Automatic Speech Recognition (ASR), basic NLP for question-answer matching, and gTTS for Text-to-Speech (TTS).
The `benax-rw/my_kinyarwanda_dataset` dataset is used for testing and validation.
---
## Features
- **ASR:** Transcribes Kinyarwanda speech using `benax-rw/KinyaWhisper`.
- **NLP:** Matches questions to answers using fuzzy string matching.
- **TTS:** Converts answers to spoken Kinyarwanda using gTTS.
- **GUI:** User-friendly Streamlit interface.
- **Dataset Integration:** Tests ASR with `benax-rw/my_kinyarwanda_dataset`.
---
## Requirements
- Python 3.8+
- Required libraries:
`streamlit`, `openai-whisper`, `gtts`, `sounddevice`, `scipy`, `numpy`, `fuzzywuzzy`, `python-Levenshtein`, `datasets`
Install all dependencies:
```bash
pip install -r requirements.txt
```
---
## Setup
1. **Clone the repository:**
```bash
git clone
github.com
cd kinyarwanda-voice-assistant
```
2. **Install dependencies:**
```bash
pip install -r requirements.txt
```
3. **Run the application:**
```bash
streamlit run kinyarwanda_voice_assistant.py
```
---
## Usage
- Open the Streamlit app in your browser.
- **Record Audio:** Click **"Record Audio"** to record a 5-second Kinyarwanda question.
- **Test Dataset:** Select a sample from `benax-rw/my_kinyarwanda_dataset` to test ASR.
- The assistant will:
- Transcribe the audio
- Match the transcription to the closest known question
- Speak the corresponding answer
- All audio files and transcriptions are saved in the `audio_files/` folder.
---
## Project Structure
```bash
kinyarwanda-voice-assistant/
├── kinyarwanda_voice_assistant.py # Main application code
├── requirements.txt # Required libraries
├── audio_files/ # Sample audio, dataset samples, transcriptions
│ └── tr …