Logo Lanfrica

ig-15/ngobyi-ai

Domain:

natural language processing

Record type:

software
Creator:
ig-
Host:
This is a mini kinyarwanda voice assistant # Kinyarwanda Voice Assistant This project simulates how a humanoid robot would process and respond to voice commands in Kinyarwanda. It implements: 1. **Speech-to-Text (ASR)**: Using KinyaWhisper to transcribe Kinyarwanda speech 2. **Natural Language Processing (NLP)**: Basic text matching to understand questions 3. **Text-to-Speech (TTS)**: Using Coqui TTS to generate spoken responses ## Features - Record or upload audio in Kinyarwanda - Transcribe speech to text using KinyaWhisper - Match questions to a knowledge base - Generate spoken responses in Kinyarwanda - Web interface built with Gradio ## Requirements - Python 3.8+ - Dependencies listed in `requirements.txt` ## Installation 1. Clone this repository: ``` git clone github.com cd NGOBYI-AI ``` 2. Create and activate a virtual environment (recommended): ``` python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate ``` 3. Install the required packages: ``` pip install -r requirements.txt ``` 4. Run the application: ``` python main.py ``` 5. Open the URL displayed in the terminal to access the web interface. ## Knowledge Base The assistant comes with a predefined set of question-answer pairs in Kinyarwanda. You can extend this by modifying the `qa_pairs` dictionary in `main.py` or by creating a separate JSON file. ## How It Works 1. **Speech Recognition**: The application uses KinyaWhisper, a fine-tuned ASR model for Kinyarwanda, to convert spoken audio to text. 2. **Question Matching**: Once transcribed, the input text is processed to find the most relevant answer from the knowledge base using simple text matching and word overlap. 3. **Response Generation**: The assistant provides the answer and converts it back to speech using a Kinyarwanda TTS model based on VITS architecture. ## Extending the System ### Add More Question-Answer Pairs To add more knowledge to the assistant, extend the `audios` library with additional Kinyarwanda questio …