Logo Lanfrica

Arsene-MN/Kinyarwanda_QA_Bot

Domaine:

natural language processing

Type de record:

software
Créateur:
Ars
Hôte:
This is a Kinyarwanda Chatbot which answers a predefined set of Kinyarwanda questions. Built on top of KinyaWhisper # 🗣️🤖 Kinyarwanda Voice Assistant A speech-based assistant for understanding and responding to spoken Kinyarwanda. This project leverages the KinyaWhisper model for transcription and provides smart, context-aware responses using a Q&A mapping system. Ideal for educational, accessibility, and information systems that need voice interaction in Kinyarwanda. --- ## 🧠 Features - 🎙️ **Kinyarwanda Speech Recognition** powered by the KinyaWhisper model - 🧽 **Noise Reduction** using `noisereduce` - 🗣️ **Voice Activity Detection (VAD)** using `webrtcvad` - 🤖 **Smart Q&A Matching** with fuzzy matching (via `fuzzywuzzy`) - 🔊 **Text-to-Speech (TTS)** response using `gTTS` - 🌐 **Web UI Interface** built with `Gradio` - 📝 **Conversation Summary Display** - 📁 Automatic saving of inputs and outputs to `audio_inputs/` and `audio_outputs/` --- ## 🚀 How It Works 1. You speak or upload Kinyarwanda audio. 2. The audio is: - Denoised and normalized - Cleared of silence via Voice Activity Detection 3. KinyaWhisper transcribes the speech to text. 4. The transcription is matched against a pre-defined Q&A database. 5. The best-matched answer is converted to speech and played back. 6. The transcription and matched Q&A key are displayed for reference. --- ## 🔧 Setup Instructions ### 1. Clone the repository ```bash git clone github.com cd kinyarwanda-voice-assistant ``` ### 2. Install dependencies Make sure Python 3.8+ is installed. ```bash pip install -r requirements.txt ``` You may also need to install system packages for gTTS, librosa, or soundfile. ### 3. 📝 Prepare Your Q&A Data Edit the `qa_mapper.json` file with your own Kinyarwanda questions and answers: ```json { "qa_pairs": [ { "question": "Mwaramutse neza?", "answer": "Mwaramutse! Amakuru yanyu?" }, { "question": "Witwa gute?", "answer": "Nitwa KinyaWhisper." } ] } ``` ### 🏁 Run the Assistant ```bash python app.py ``` Then open the browser at localhost or …