Logo Lanfrica

Exaucee-09/kinyarwanda-voice-assistant

Domain:

natural language processing

Record type:

softwareproject
Creator:
Exa
Host:
A mini voice assistant that understands and responds in Kinyarwanda, created for the Intelligent Robotics course. This project demonstrates how voice interaction systems can work in humanoid robots using local languages. # Kinyarwanda Voice Assistant (Robo) A voice assistant that understands and responds in Kinyarwanda language using the KinyaWhisper ASR model and gTTS for speech synthesis. ## Project Structure - `simple_assistant.py`: Main application that integrates all components - `asr.py`: Speech recognition component using KinyaWhisper - `tts.py`: Text-to-speech component using gTTS - `nlp.py`: Natural language processing component with Q&A matching - `manualRecording.py`: Original script for recording samples, automated recording ## Setup Instructions ### 1. Install Dependencies ```bash pip install -r requirements.txt ``` For PyAudio installation on different platforms: - **Windows**: `pip install pyaudio` - **macOS**: `brew install portaudio` then `pip install pyaudio` - **Linux**: `sudo apt-get install python3-pyaudio` or `sudo apt-get install portaudio19-dev` then `pip install pyaudio` ### 2. Download Model The system will automatically download the KinyaWhisper model from Hugging Face on first run: - `benax-rw/KinyaWhisper` - Kinyarwanda ASR model ### 3. Record Voice Samples (Optional) You can record your own voice samples to test the system: ```bash python manualRecord.py ``` This will guide you through recording questions and answers in Kinyarwanda. ## Running the Voice Assistant To start the voice assistant: ```bash python simple_assistant.py ``` ## Usage 1. The assistant will greet you in Kinyarwanda 2. Speak your question or command in Kinyarwanda 3. The assistant will process your speech, match it to the closest question in its database, and respond. ## Extending the Assistant ### Adding New Q&A Pairs You can add new question-answer pairs to the `qa_pairs` dictionary in `nlp.py`: ```python qa_pairs.update({ "new question": "new answer", "another question": "another answer" }) ``` After adding new pairs, record voice samples using `manualRecord` file. ### Improving Speech Recognition The KinyaWhisper model provides basic Kinyarwanda speech r …