How vikassingh2005/voice_ works
This repository implements a local voice assistant with a FastAPI command interface and a voice-turn pipeline: wake-word detection, microphone capture, transcription, intent handling or LLM response, then optional speech playback. The backend also provides system-control actions, conversational memory, and command logging. The sampled sources show main.py orchestrating these services; app.js and vrm-model.js were read but their contents do not establish connections to the backend, so those links are marked unverified.
Main entry points: main.py FastAPI service · config.py Assistant configuration · app.js Web interface · audio_handler.py Microphone capture
Components 19
User interfaces
- Web interface
app.js - VRM model
vrm-model.js
Assistant orchestration
- FastAPI service
main.py - Assistant configuration
config.py
Voice processing
- Wake-word detector
wake_word.py - Microphone capture
audio_handler.py - Speech transcription
stt.py - Speech synthesis
tts.py
Intelligence and actions
- Intent parser
command_parser.py - LLM response and tools
llm.py - System actions
system_control.py
Persistence
- Semantic memory
memory.py - ChromaDB store
- Command logging
database.py - SQLite database
pravaha_core.db
Other components
- User
- Microphone
- Ollama service
- Audio output
Connections 26
- User → Web interface: uses
- Web interface → FastAPI service: sends commands
- User → Microphone: speaks
- Microphone → Wake-word detector: streams audio
- FastAPI service → Wake-word detector: dispatches listening
main.py - FastAPI service → Microphone capture: captures utterance
main.py - Microphone capture → Microphone: reads audio
- FastAPI service → Speech transcription: transcribes audio
main.py - FastAPI service → Intent parser: parses command
main.py - FastAPI service → LLM response and tools: requests response
main.py - LLM response and tools → Ollama service: calls model
- FastAPI service → System actions: executes intent
main.py - FastAPI service → Semantic memory: uses context
main.py - Semantic memory → ChromaDB store: reads and writes
memory.py - FastAPI service → Speech synthesis: speaks response
main.py - Speech synthesis → Audio output: plays audio
- FastAPI service → Command logging: logs commands
main.py - Command logging → SQLite database: reads and writes
database.py - FastAPI service → Assistant configuration: reads settings
main.py - Microphone capture → Assistant configuration: reads settings
audio_handler.py - Wake-word detector → Assistant configuration: reads settings
wake_word.py - Speech transcription → Assistant configuration: reads settings
stt.py - LLM response and tools → Assistant configuration: reads settings
llm.py - Semantic memory → Assistant configuration: reads settings
memory.py - Speech synthesis → Assistant configuration: reads settings
tts.py - Web interface → VRM model: renders model