How bug-scorchers/grace_voice_agent works
GRACE is a Windows-oriented voice and gesture assistant that turns speech or hand poses into computer actions and spoken responses. The main voice workflow is microphone capture, wake-word/utterance handling, transcription, fixed-command parsing or LLM routing, then intent execution and feedback. Separate capabilities include screen reading and analysis, web search, image generation, dictation, and gesture control. The graph follows documented behavior and source-index references; several runtime and integration details are unsampled, so uncertain links are omitted.
Main entry points: legacy_voice.py Voice agent · __main__.py Application runtime · voice.py Voice capture · registry.py Action registry
Components 28
Input and UI
- Voice capture
grace/input/voice.py - Audio and VAD
grace/input/audio.py - Wake detection
grace/input/wakeword.py - Speech recognition
grace/input/stt/base.py - Gesture control
grace/input/gestures/controller.py - Global hotkeys
grace/input/hotkeys.py - Status overlay
grace/ui/overlay.py - Speech output
tts.py
Intent handling
- Voice agent
grace/legacy_voice.py - Command grammar
grace/intent/grammar.py - Follow-up dialogue
grace/intent/dialogue.py - LLM router
grace/intent/router.py - Chat providers
grace/intent/providers.py
Assistant capabilities
- Tool definitions
grace/intent/tools.py - Web search
grace/intent/search.py - Image understanding
grace/intent/images.py - Code assistance
grace/intent/assistant.py - Screen reading
screen_reader.py
Actions and control
- Action registry
grace/actions/registry.py - App and window actions
grace/actions/apps.py - Input control
grace/actions/input_ctl.py - System actions
grace/actions/system.py - Action executor
grace/actions/executor.py
Runtime services
- Event bus
grace/core/bus.py - Quota governor
grace/core/quota.py - Configuration
grace/config.py - Application runtime
grace/__main__.py
Other components
- User
Connections 32
- User → Voice capture: speaks to
README.md - Voice capture → Audio and VAD: captures audio
grace/input/voice.py - Voice capture → Wake detection: checks wake word
grace/input/voice.py - Voice capture → Speech recognition: transcribes
grace/input/voice.py - Voice capture → Voice agent: sends transcript
grace/legacy_voice.py - Voice agent → Command grammar: parses commands
grace/legacy_voice.py - Voice agent → Follow-up dialogue: resolves follow-ups
grace/legacy_voice.py - Voice agent → LLM router: routes unmatched text
grace/legacy_voice.py - LLM router → Chat providers: requests completion
grace/intent/router.py - LLM router → Tool definitions: validates tool calls
grace/intent/router.py - Tool definitions → Action registry: uses action schema
grace/intent/tools.py - Voice agent → Action executor: dispatches intents
grace/legacy_voice.py - Action executor → Action registry: executes actions
grace/actions/executor.py - Action registry → App and window actions: registers handlers
grace/actions/__init__.py - Action registry → Input control: registers handlers
grace/actions/__init__.py - Action registry → System actions: registers handlers
grace/actions/__init__.py - Voice agent → Speech output: speaks replies
grace/legacy_voice.py - Voice agent → Screen reading: reads screen
grace/legacy_voice.py - Code assistance → Image understanding: uses image analysis
grace/intent/assistant.py - Code assistance → Web search: uses web search
grace/intent/assistant.py - Image understanding → Screen reading: reads screen content
grace/intent/images.py - Image understanding → Quota governor: checks usage
grace/intent/images.py - Web search → Quota governor: records search use
grace/intent/search.py - User → Gesture control: poses to camera
README.md - User → Global hotkeys: presses shortcuts
README.md - Application runtime → Voice capture: starts voice input
grace/__main__.py - Application runtime → Gesture control: starts gesture control
grace/__main__.py - Application runtime → Status overlay: starts overlay
grace/__main__.py - Status overlay → Event bus: subscribes to events
grace/ui/overlay.py - Status overlay → Application runtime: reads runtime state
grace/ui/overlay.py - Application runtime → Configuration: loads settings
grace/__main__.py - Application runtime → Event bus: starts event bus
grace/__main__.py