# sadhithyan7/jarvis-voice-assistant architecture

> Architecture diagram of the GitHub repository sadhithyan7/jarvis-voice-assistant, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sadhithyan7/jarvis-voice-assistant
- Repository: https://github.com/sadhithyan7/jarvis-voice-assistant

## Overview

Jarvis is a local Windows voice assistant: a hotkey starts a listening turn, recognized speech is handled by the conversation engine, and its reply is spoken aloud. The engine can consult conversation memory, request Groq responses, analyze screenshots, and dispatch tagged system actions. The README also documents console/log access and emergency shutdown. Source excerpts show the main call paths; optional providers and some documented wiring are not fully sampled.

Main entry points: [`brain.py`](https://github.com/sadhithyan7/jarvis-voice-assistant/blob/main/brain.py) (LLM Conversation), [`main.py`](https://github.com/sadhithyan7/jarvis-voice-assistant/blob/main/main.py) (Hotkeys And Turn Loop), [`listener.py`](https://github.com/sadhithyan7/jarvis-voice-assistant/blob/main/listener.py) (Speech Listener), [`speaker.py`](https://github.com/sadhithyan7/jarvis-voice-assistant/blob/main/speaker.py) (Speech Output)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Assistant Runtime"]
  node_main["Hotkeys And Turn Loop<br/>[main.py]"]
  node_listener["Speech Listener<br/>[listener.py]"]
  node_speaker["Speech Output<br/>[speaker.py]"]
end

subgraph group_intelligence["Conversation Engine"]
  node_generation["LLM Conversation<br/>[brain.py]"]
  node_memory["Conversation Memory<br/>[brain.py]"]
  node_vision["Screen Analysis<br/>[brain.py]"]
  node_dispatch["Action Tag Dispatch<br/>[brain.py]"]
end

subgraph group_actions["System Actions"]
  node_app_launch["App And Website Launch<br/>[actions.py]"]
  node_system_status["Time Battery Bluetooth<br/>[actions.py]"]
  node_volume["Volume Control<br/>[actions.py]"]
  node_wiki["Wikipedia Search<br/>[actions.py]"]
  node_screenshot["Screenshot Capture<br/>[actions.py]"]
end

subgraph group_services["Storage And Services"]
  node_db[("SQLite Conversations<br/>[database.py]")]
  node_groq["Groq LLM"]
  node_speech_recognition["Google Speech Recognition"]
  node_microphone["Microphone"]
  node_tts["Edge TTS"]
  node_windows["Windows System"]
  node_wikipedia_service["Wikipedia"]
end

node_user(("User"))

node_user -->|"activates hotkey"| node_main
node_main -->|"captures speech"| node_listener
node_listener -->|"records audio"| node_microphone
node_listener -->|"transcribes audio"| node_speech_recognition
node_main -->|"submits text"| node_generation
node_generation -->|"requests completion"| node_groq
node_generation -->|"checks memory"| node_memory
node_memory -->|"reads and writes"| node_db
node_generation -->|"processes reply"| node_dispatch
node_dispatch -->|"launches target"| node_app_launch
node_dispatch -->|"runs status action"| node_system_status
node_dispatch -->|"changes volume"| node_volume
node_dispatch -->|"searches topic"| node_wiki
node_generation -->|"routes screen query"| node_vision
node_vision -->|"captures screen"| node_screenshot
node_vision -->|"sends image analysis"| node_groq
node_app_launch -->|"opens app or site"| node_windows
node_system_status -->|"queries device"| node_windows
node_volume -->|"sends volume keys"| node_windows
node_wiki -->|"fetches summary"| node_wikipedia_service
node_main -->|"speaks response"| node_speaker
node_speaker -->|"synthesizes speech"| node_tts

click node_main "https://github.com/sadhithyan7/jarvis-voice-assistant/blob/main/main.py"
click node_listener "https://github.com/sadhithyan7/jarvis-voice-assistant/blob/main/listener.py"
click node_speaker "https://github.com/sadhithyan7/jarvis-voice-assistant/blob/main/speaker.py"
click node_generation "https://github.com/sadhithyan7/jarvis-voice-assistant/blob/main/brain.py"
click node_memory "https://github.com/sadhithyan7/jarvis-voice-assistant/blob/main/brain.py"
click node_vision "https://github.com/sadhithyan7/jarvis-voice-assistant/blob/main/brain.py"
click node_dispatch "https://github.com/sadhithyan7/jarvis-voice-assistant/blob/main/brain.py"
click node_app_launch "https://github.com/sadhithyan7/jarvis-voice-assistant/blob/main/actions.py"
click node_system_status "https://github.com/sadhithyan7/jarvis-voice-assistant/blob/main/actions.py"
click node_volume "https://github.com/sadhithyan7/jarvis-voice-assistant/blob/main/actions.py"
click node_wiki "https://github.com/sadhithyan7/jarvis-voice-assistant/blob/main/actions.py"
click node_screenshot "https://github.com/sadhithyan7/jarvis-voice-assistant/blob/main/actions.py"
click node_db "https://github.com/sadhithyan7/jarvis-voice-assistant/blob/main/database.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_main,node_listener,node_speaker,node_user toneBlue
class node_generation,node_memory,node_vision,node_dispatch toneAmber
class node_app_launch,node_system_status,node_volume,node_wiki,node_screenshot toneMint
class node_db,node_groq,node_speech_recognition,node_microphone,node_tts,node_windows,node_wikipedia_service toneRose
```

## Components

### Assistant Runtime

- [Hotkeys And Turn Loop](https://github.com/sadhithyan7/jarvis-voice-assistant/blob/main/main.py): `main.py`
- [Speech Listener](https://github.com/sadhithyan7/jarvis-voice-assistant/blob/main/listener.py): `listener.py`
- [Speech Output](https://github.com/sadhithyan7/jarvis-voice-assistant/blob/main/speaker.py): `speaker.py`

### Conversation Engine

- [LLM Conversation](https://github.com/sadhithyan7/jarvis-voice-assistant/blob/main/brain.py): `brain.py`
- [Conversation Memory](https://github.com/sadhithyan7/jarvis-voice-assistant/blob/main/brain.py): `brain.py`
- [Screen Analysis](https://github.com/sadhithyan7/jarvis-voice-assistant/blob/main/brain.py): `brain.py`
- [Action Tag Dispatch](https://github.com/sadhithyan7/jarvis-voice-assistant/blob/main/brain.py): `brain.py`

### System Actions

- [App And Website Launch](https://github.com/sadhithyan7/jarvis-voice-assistant/blob/main/actions.py): `actions.py`
- [Time Battery Bluetooth](https://github.com/sadhithyan7/jarvis-voice-assistant/blob/main/actions.py): `actions.py`
- [Volume Control](https://github.com/sadhithyan7/jarvis-voice-assistant/blob/main/actions.py): `actions.py`
- [Wikipedia Search](https://github.com/sadhithyan7/jarvis-voice-assistant/blob/main/actions.py): `actions.py`
- [Screenshot Capture](https://github.com/sadhithyan7/jarvis-voice-assistant/blob/main/actions.py): `actions.py`

### Storage And Services

- [SQLite Conversations](https://github.com/sadhithyan7/jarvis-voice-assistant/blob/main/database.py): `database.py`
- **Groq LLM**
- **Google Speech Recognition**
- **Microphone**
- **Edge TTS**
- **Windows System**
- **Wikipedia**

### Other components

- **User**

## Connections

- User → Hotkeys And Turn Loop: activates hotkey (evidence: `README.md`)
- Hotkeys And Turn Loop → Speech Listener: captures speech (evidence: `main.py`)
- Speech Listener → Microphone: records audio (evidence: `listener.py`)
- Speech Listener → Google Speech Recognition: transcribes audio (evidence: `listener.py`)
- Hotkeys And Turn Loop → LLM Conversation: submits text (evidence: `main.py`)
- LLM Conversation → Groq LLM: requests completion (evidence: `brain.py`)
- LLM Conversation → Conversation Memory: checks memory (evidence: `brain.py`)
- Conversation Memory → SQLite Conversations: reads and writes (evidence: `brain.py`)
- LLM Conversation → Action Tag Dispatch: processes reply (evidence: `brain.py`)
- Action Tag Dispatch → App And Website Launch: launches target (evidence: `brain.py`)
- Action Tag Dispatch → Time Battery Bluetooth: runs status action (evidence: `brain.py`)
- Action Tag Dispatch → Volume Control: changes volume (evidence: `brain.py`)
- Action Tag Dispatch → Wikipedia Search: searches topic (evidence: `brain.py`)
- LLM Conversation → Screen Analysis: routes screen query (evidence: `brain.py`)
- Screen Analysis → Screenshot Capture: captures screen (evidence: `brain.py`)
- Screen Analysis → Groq LLM: sends image analysis (evidence: `brain.py`)
- App And Website Launch → Windows System: opens app or site (evidence: `actions.py`)
- Time Battery Bluetooth → Windows System: queries device (evidence: `actions.py`)
- Volume Control → Windows System: sends volume keys (evidence: `actions.py`)
- Wikipedia Search → Wikipedia: fetches summary (evidence: `actions.py`)
- Hotkeys And Turn Loop → Speech Output: speaks response (evidence: `main.py`)
- Speech Output → Edge TTS: synthesizes speech (evidence: `speaker.py`)
