Logo Lanfrica

SIGYE/Kinya-voice-assistant

Domain:

natural language processing

Record type:

software
Creator:
SIG
Host:
A Kinyarwanda voice assistant # πŸ—£οΈ Kinyarwanda Voice Assistant A bilingual voice interaction tool utilizing Whisper for transcribing speech and TTS for generating speech from text. It includes an intuitive Gradio interface featuring two functional tabs: voice-based Q&A and custom TTS synthesis. --- ## πŸ”§ Key Functionalities - πŸŽ™οΈ **Automatic Speech Recognition** powered by Whisper. - πŸ’¬ **Kinyarwanda-based Question Answering** from preset responses. - πŸ”Š **Text-to-Speech Synthesis** using models from Hugging Face. - πŸ–₯️ **Interactive Web UI** built with Gradio. - πŸ” **Speaker Cloning** using reference audio files. - 🌍 **Launchable Web Interface** with optional public sharing. --- ## πŸ› οΈ Installation Guide ### βš™οΈ Python Dependencies Ensure your Python environment is ready by installing the required libraries: ```bash pip install -q openai-whisper pip install numpy==1.24.3 --force-reinstall pip install gradio pip install transformers pip install torchaudio pip install TTS pip install nemo-toolkit Alternatively, install from the requirements file: bash Copy Edit pip install --no-cache-dir -r /content/drive/MyDrive/kinya-assistant/stt/requirements.txt 🧰 Required System Packages Install sox for audio manipulation: bash Copy Edit apt-get update && apt-get install -y sox libsox-fmt-all πŸš€ Getting Started 🎀 Using the Voice Assistant Record your voice or upload an audio file. Workflow: Audio is transcribed using Whisper. Text is matched to predefined Kinyarwanda inputs. Audio response is generated and played. πŸ“’ Text-to-Speech Module Input your custom text. Upload a .wav file as a voice sample. Select the target language. The assistant will generate speech and play it. 🧠 Behind the Scenes Loading the Models python Copy Edit whisper_model = whisper.load_model("small") hf_model = TTS(model_name="tts_models/en/ljspeech/tacotron2-DDC") Audio Transcription Process python Copy Edit def transcribe_audio(audio_path): waveform, sample_rate = torchaudio.load(audio_path) ... result = whisper_model.transc …