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