How m-saad-k/basic-voice-based-ai-assistant works
Klara is a small voice-based AI assistant. The principal loop captures speech, recognizes text, asks Gemini for a short reply, and speaks that reply; the integration module owns the calls between stages. The README documents Vosk, Gemini, and TTS, while the sampled source confirms their runtime roles. The Vosk model directory is present, but its contents and configuration are not shown; the source contains a placeholder model path and API key.
Main entry points: AI_speech_integretion.py Assistant loop · speech_to_text.py Speech recognition · AI_models.py Response generation · imp_text_to_speech.py Text to speech
Components 10
Speech capture
- Assistant loop
Klara/software/AI_speech_integretion.py - Speech recognition
Klara/software/speech_to_text.py - Vosk model
Klara/packages/vosk_model
AI response
- Response generation
Klara/software/AI_models.py - Gemini API
Speech playback
- Text to speech
Klara/software/imp_text_to_speech.py - Generated audio
Klara/software/output.wav
Other components
- User
- Microphone
- Speaker
Connections 12
- User → Microphone: speaks
- Microphone → Speech recognition: audio input
- Assistant loop → Speech recognition: calls
- Speech recognition → Vosk model: recognizes with
- Speech recognition → Assistant loop: returns text
- Assistant loop → Response generation: sends prompt
- Response generation → Gemini API: requests response
- Gemini API → Response generation: returns response
- Response generation → Assistant loop: returns text
- Assistant loop → Text to speech: passes reply
- Text to speech → Generated audio: writes audio
- Text to speech → Speaker: plays audio