Logo Lanfrica

kundwa-iriza/Kinyarwanda-Assistant

Domain:

natural language processing

Record type:

software
Creator:
kun
Host:
This is a mini voice assistant that: Converts Kinyarwanda speech into text (ASR), Matches it to the correct answer (NLP), And speaks the answer back (TTS). # πŸ—£οΈ Kinyarwanda Voice Assistant This is an open-source voice assistant for the Kinyarwanda language, featuring automatic speech recognition (ASR), natural language understanding (NLU), and text-to-speech (TTS). It allows users to ask questions in Kinyarwanda and get spoken responses. --- ## πŸš€ Features - **ASR with KinyaWhisper** – Converts spoken Kinyarwanda into text using a Whisper model fine-tuned for the language. - **NLU with simple NLP matching** – Finds best-matching answers from a local Q&A database using fuzzy string matching. - **TTS with Coqui TTS** – Synthesizes responses in natural-sounding speech. - **Local audio playback** – Works on Windows, macOS, and Linux. --- ## 🧰 Technologies Used - Python 3.8+ - HuggingFace Transformers - Torchaudio - Coqui TTS - Git & GitHub --- ## πŸ“ Project Structure ```yaml kinya-voice-assistant/ β”œβ”€β”€ data/ β”‚ └── qa_pairs.json # Q&A knowledge base β”œβ”€β”€ audio/ β”‚ └── response.wav # Generated speech β”œβ”€β”€ src/ β”‚ β”œβ”€β”€ asr.py # Audio-to-text using KinyaWhisper β”‚ β”œβ”€β”€ nlp.py # Text matching and response selection β”‚ β”œβ”€β”€ ttls.py # Text-to-speech using Coqui TTS β”‚ └── main.py # Main script β”œβ”€β”€ requirements.txt # Dependencies └── README.md # This file ``` --- ## πŸ› οΈ Setup Instructions ### 1. Clone the Repository ```bash git clone github.com cd kinya-voice-assistant ``` 2. Create Virtual Environment ```bash python -m venv venv # For Windows: venv\Scripts\activate # For macOS/Linux: source venv/bin/activate ``` 3. Install Dependencies ```bash pip install -r requirements.txt ``` If you haven’t installed Coqui TTS yet: ```bash pip install TTS ``` πŸ§ͺ How to Run Place a 16kHz WAV file in the project folder. Update the path in src/main.py if needed. Run the assistant: ```bash python src/main.py ``` The assistant will transcribe the audio, find a matching response, and play the reply using Coqui TTS. πŸ—ƒοΈ Add Your Own Q&A Edit the file at data/qa_pairs.json: ```json { "amakuru yawe": …