Kinyarwanda voice assistant
# π£οΈ Kinyarwanda Voice Assistant (ASR + TTS)
This project is a simple voice assistant that listens to `.wav` audio recordings in **Kinyarwanda**, transcribes them using a **Whisper ASR model**, finds a matching response, and replies using a **VITS text-to-speech model**.
---
## π§ Features
- ποΈ Transcribes spoken Kinyarwanda using `mbazaNLP/Whisper-Small-Kinyarwanda`
- π£οΈ Responds with natural Kinyarwanda speech using `facebook/mms-tts-kin`
- β
Matches predefined questions and answers
- π Saves and plays generated responses
---
## π¦ Installation
### 1. Clone the Repository
```bash
git clone
github.com
cd Kinyarwanda_Voice-Assistant
## π¦ 2. Install Dependencies
Make sure you are using **Python 3.8+**, then install the required packages:
```bash
pip install torch torchaudio transformers soundfile
```
---
## π₯οΈ FFmpeg Setup (Windows Only)
To enable audio playback from the script, FFmpeg must be installed.
### π½ Steps to Install:
1. Download FFmpeg from
gyan.dev
2. Extract the ZIP file
3. Locate the `bin` folder inside the extracted directory
### βοΈ Choose One of the Following:
**Option A β Add to System Environment Variables:**
- Open "Environment Variables"
- Add the full path to `ffmpeg\bin` to your system `PATH`
**Option B β Modify the Script Directly:**
In your Python script (`main.py`), add:
```python
os.environ["PATH"] += os.pathsep + r"C:\path\to\ffmpeg\bin"
```
---
## π§ Pretrained Models
These models are automatically downloaded from Hugging Face when you run the script for the first time:
| Task | Model Name |
|---------------------|----------------------------------------|
| ASR (Transcription) | `mbazaNLP/Whisper-Small-Kinyarwanda` |
| TTS (Speech) | `facebook/mms-tts-kin` |
---
## π Project Structure
```plaintext
kinyarwanda-voice-assistant/
β
βββ data/
β βββ audio/ # Input .wav audio fi β¦