How lucascala28/voice_assistant works
This repository implements a local voice assistant: microphone audio is gated by a wake word and voice-activity detection, transcribed, sent to a tool-capable language model, and answered with speech. Model-selected tools can control configured smart plugs or retrieve weather. The main orchestration and those tool integrations are visible in excerpts; no README is present, and unsampled files limit evidence for additional capabilities and runtime wiring.
Main entry points: req_to_res.py Model and tools · vad.py Speech segmentation · smart_home.py Smart plug control · init.py Assistant runtime
Components 16
Audio input
- Microphone stream
mic/mic_connect.py - Wake detection
mic/wake_word_detect.py - Speech segmentation
mic/vad.py - Speech transcription
mic/transcribe.py
Assistant conversation
- Assistant runtime
mic/init.py - Model and tools
mic/req_to_res.py
Assistant tools
- Smart plug control
mic/smart_home.py - Device configuration
- Weather lookup
mic/weather.py - User information database
data/userinfo.db
Speech output
- Speech synthesis
mic/tts.py - Task completion sound
mic/task-complete.mp3
Other components
- Voice user
- Language model service
- Tuya / Kasa plugs
- Weather and geocoding APIs
Connections 15
- Voice user → Microphone stream: speaks into
mic/mic_connect.py - Speech segmentation → Microphone stream: reads frames
mic/vad.py - Speech segmentation → Wake detection: checks wake word
mic/vad.py - Speech segmentation → Speech transcription: yields speech audio
mic/transcribe.py - Assistant runtime → Speech transcription: collects transcripts
mic/init.py - Assistant runtime → Model and tools: submits transcript
mic/init.py - Model and tools → Language model service: requests response
mic/req_to_res.py - Model and tools → Smart plug control: dispatches device tool
mic/req_to_res.py - Model and tools → Weather lookup: dispatches weather tool
mic/req_to_res.py - Smart plug control → Device configuration: loads devices
mic/smart_home.py - Smart plug control → Tuya / Kasa plugs: controls plugs
mic/smart_home.py - Weather lookup → Weather and geocoding APIs: requests forecasts
mic/weather.py - Model and tools → Speech synthesis: speaks response
mic/req_to_res.py - Model and tools → Task completion sound: plays completion sound
mic/req_to_res.py - Model and tools → User information database