A lightweight Kinyarwanda speech assistant that transcribes spoken queries, processes natural language intents, and responds with synthesized speech—bridging technology with Rwanda's primary language.
# Kinyarwanda Voice Assistant
A mini voice assistant for Kinyarwanda language, built for the Intelligent Robotics course (April 2025). This project implements a complete voice interaction pipeline with Automatic Speech Recognition (ASR), Natural Language Processing (NLP), and Text-to-Speech (TTS) capabilities.
## 🚀 Features
- **🗣️ Speech Recognition**: Transcribes Kinyarwanda speech to text using `benax-rw/KinyaWhisper` (ASR)
- **🤖 NLP Processing**: Understands queries using intent-based pattern matching with fuzzy matching capabilities
- **🔊 Speech Synthesis**: Generates natural-sounding Kinyarwanda speech using custom TTS models
- **🌐 Web Interface**: User-friendly Gradio interface for interactive conversations
- **💻 CLI Support**: Command-line interface for batch processing of audio files
## 📂 Project Structure
```
kinyarwanda-voice-assistant/
├── gradio_app.py # Main Gradio web interface
├── main.py # Command-line application
├── asr/
│ └── transcribe.py # Speech recognition module
├── nlp/
│ ├── qa_engine.py # Question answering system
│ └── intents.json # Intent patterns and responses
├── tts/
│ └── speech_synth.py # Text-to-speech engine
├── Inference/
│ └── kinyatts/ # TTS model and utilities
├── test_audio/ # Sample audio files
└── transcription_output/ # Generated audio outputs
```
## Installation
1. Clone the repository:
```bash
git clone
github.com
cd kinyarwanda-voice-assistant
```
2. Create and activate a virtual environment:
```bash
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
```
3. Install dependencies:
```bash
pip install -r requirements.txt
```
4. Set up the TTS model:
- Download the TTS model file and place it at the correct location
- Verify the paths in `tts/speech_synth.py`
## Usage
You can use the system from the command line:
```bash
python main.py
` …