# sohangadewar/ai-desktop-assisatnt architecture

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

- Interactive diagram: https://gitdiagram.com/sohangadewar/ai-desktop-assisatnt
- Repository: https://github.com/sohangadewar/ai-desktop-assisatnt

## Overview

This is a Python desktop voice assistant. Its main workflow listens for speech, waits for a Jarvis wake word, dispatches recognized commands, and speaks results; a concurrent UI reflects listening and speaking states. Command branches cover system controls, web and app launching, time/date, battery, weather, and calls. The README is brief, so workflow details come from assistant.py; the weather service is visible there, while other external behavior is limited to the calls shown in that file.

Main entry points: [`AI-Desktop-Assistant/assistant.py`](https://github.com/sohangadewar/ai-desktop-assisatnt/blob/main/AI-Desktop-Assistant/assistant.py) (Command dispatch)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interaction["Voice and UI"]
  node_assistant["Assistant runtime<br/>[assistant.py]"]
  node_speech_input["Speech recognition<br/>[assistant.py]"]
  node_speech_output["Spoken responses<br/>[assistant.py]"]
  node_visual_ui["Animated UI<br/>[assistant.py]"]
end

subgraph group_commands["Command handling"]
  node_command_dispatch["Command dispatch<br/>[assistant.py]"]
  node_system_controls["System controls<br/>[assistant.py]"]
  node_web_actions["Web and apps<br/>[assistant.py]"]
  node_time_info["Date and time<br/>[assistant.py]"]
  node_battery_info["Battery status<br/>[assistant.py]"]
  node_weather["Weather lookup<br/>[assistant.py]"]
  node_contacts["Contact calling<br/>[assistant.py]"]
end

subgraph group_integrations["System and services"]
  node_os["Desktop operating system"]
  node_browser["Web browser"]
  node_weather_service["wttr.in"]
  node_battery_api["Battery sensor API"]
  node_telephony["Telephone handler"]
end

node_user(("User"))

node_user -->|"speaks commands"| node_speech_input
node_speech_input -->|"returns recognized text"| node_assistant
node_assistant -->|"dispatches commands"| node_command_dispatch
node_assistant -->|"acknowledges wake word"| node_speech_output
node_command_dispatch -->|"speaks replies"| node_speech_output
node_assistant -->|"starts UI thread"| node_visual_ui
node_visual_ui -->|"reads interaction state"| node_assistant
node_command_dispatch -->|"handles controls"| node_system_controls
node_command_dispatch -->|"handles app requests"| node_web_actions
node_command_dispatch -->|"formats current date"| node_time_info
node_command_dispatch -->|"checks battery"| node_battery_info
node_command_dispatch -->|"requests weather"| node_weather
node_command_dispatch -->|"matches contacts"| node_contacts
node_system_controls -->|"runs system commands"| node_os
node_web_actions -->|"opens pages"| node_browser
node_contacts -->|"opens telephone link"| node_telephony
node_battery_info -->|"reads sensor"| node_battery_api
node_weather -->|"fetches JSON"| node_weather_service
node_weather -->|"speaks report"| node_speech_output

click node_assistant "https://github.com/sohangadewar/ai-desktop-assisatnt/blob/main/AI-Desktop-Assistant/assistant.py"
click node_speech_input "https://github.com/sohangadewar/ai-desktop-assisatnt/blob/main/AI-Desktop-Assistant/assistant.py"
click node_speech_output "https://github.com/sohangadewar/ai-desktop-assisatnt/blob/main/AI-Desktop-Assistant/assistant.py"
click node_visual_ui "https://github.com/sohangadewar/ai-desktop-assisatnt/blob/main/AI-Desktop-Assistant/assistant.py"
click node_command_dispatch "https://github.com/sohangadewar/ai-desktop-assisatnt/blob/main/AI-Desktop-Assistant/assistant.py"
click node_system_controls "https://github.com/sohangadewar/ai-desktop-assisatnt/blob/main/AI-Desktop-Assistant/assistant.py"
click node_web_actions "https://github.com/sohangadewar/ai-desktop-assisatnt/blob/main/AI-Desktop-Assistant/assistant.py"
click node_time_info "https://github.com/sohangadewar/ai-desktop-assisatnt/blob/main/AI-Desktop-Assistant/assistant.py"
click node_battery_info "https://github.com/sohangadewar/ai-desktop-assisatnt/blob/main/AI-Desktop-Assistant/assistant.py"
click node_weather "https://github.com/sohangadewar/ai-desktop-assisatnt/blob/main/AI-Desktop-Assistant/assistant.py"
click node_contacts "https://github.com/sohangadewar/ai-desktop-assisatnt/blob/main/AI-Desktop-Assistant/assistant.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_assistant,node_speech_input,node_speech_output,node_visual_ui,node_user toneBlue
class node_command_dispatch,node_system_controls,node_web_actions,node_time_info,node_battery_info,node_weather,node_contacts toneAmber
class node_os,node_browser,node_weather_service,node_battery_api,node_telephony toneMint
```

## Components

### Voice and UI

- [Assistant runtime](https://github.com/sohangadewar/ai-desktop-assisatnt/blob/main/AI-Desktop-Assistant/assistant.py): `AI-Desktop-Assistant/assistant.py`
- [Speech recognition](https://github.com/sohangadewar/ai-desktop-assisatnt/blob/main/AI-Desktop-Assistant/assistant.py): `AI-Desktop-Assistant/assistant.py`
- [Spoken responses](https://github.com/sohangadewar/ai-desktop-assisatnt/blob/main/AI-Desktop-Assistant/assistant.py): `AI-Desktop-Assistant/assistant.py`
- [Animated UI](https://github.com/sohangadewar/ai-desktop-assisatnt/blob/main/AI-Desktop-Assistant/assistant.py): `AI-Desktop-Assistant/assistant.py`

### Command handling

- [Command dispatch](https://github.com/sohangadewar/ai-desktop-assisatnt/blob/main/AI-Desktop-Assistant/assistant.py): `AI-Desktop-Assistant/assistant.py`
- [System controls](https://github.com/sohangadewar/ai-desktop-assisatnt/blob/main/AI-Desktop-Assistant/assistant.py): `AI-Desktop-Assistant/assistant.py`
- [Web and apps](https://github.com/sohangadewar/ai-desktop-assisatnt/blob/main/AI-Desktop-Assistant/assistant.py): `AI-Desktop-Assistant/assistant.py`
- [Date and time](https://github.com/sohangadewar/ai-desktop-assisatnt/blob/main/AI-Desktop-Assistant/assistant.py): `AI-Desktop-Assistant/assistant.py`
- [Battery status](https://github.com/sohangadewar/ai-desktop-assisatnt/blob/main/AI-Desktop-Assistant/assistant.py): `AI-Desktop-Assistant/assistant.py`
- [Weather lookup](https://github.com/sohangadewar/ai-desktop-assisatnt/blob/main/AI-Desktop-Assistant/assistant.py): `AI-Desktop-Assistant/assistant.py`
- [Contact calling](https://github.com/sohangadewar/ai-desktop-assisatnt/blob/main/AI-Desktop-Assistant/assistant.py): `AI-Desktop-Assistant/assistant.py`

### System and services

- **Desktop operating system**
- **Web browser**
- **wttr.in**
- **Battery sensor API**
- **Telephone handler**

### Other components

- **User**

## Connections

- User → Speech recognition: speaks commands (evidence: `AI-Desktop-Assistant/assistant.py`)
- Speech recognition → Assistant runtime: returns recognized text (evidence: `AI-Desktop-Assistant/assistant.py`)
- Assistant runtime → Command dispatch: dispatches commands (evidence: `AI-Desktop-Assistant/assistant.py`)
- Assistant runtime → Spoken responses: acknowledges wake word (evidence: `AI-Desktop-Assistant/assistant.py`)
- Command dispatch → Spoken responses: speaks replies (evidence: `AI-Desktop-Assistant/assistant.py`)
- Assistant runtime → Animated UI: starts UI thread (evidence: `AI-Desktop-Assistant/assistant.py`)
- Animated UI → Assistant runtime: reads interaction state (evidence: `AI-Desktop-Assistant/assistant.py`)
- Command dispatch → System controls: handles controls (evidence: `AI-Desktop-Assistant/assistant.py`)
- Command dispatch → Web and apps: handles app requests (evidence: `AI-Desktop-Assistant/assistant.py`)
- Command dispatch → Date and time: formats current date (evidence: `AI-Desktop-Assistant/assistant.py`)
- Command dispatch → Battery status: checks battery (evidence: `AI-Desktop-Assistant/assistant.py`)
- Command dispatch → Weather lookup: requests weather (evidence: `AI-Desktop-Assistant/assistant.py`)
- Command dispatch → Contact calling: matches contacts (evidence: `AI-Desktop-Assistant/assistant.py`)
- System controls → Desktop operating system: runs system commands (evidence: `AI-Desktop-Assistant/assistant.py`)
- Web and apps → Web browser: opens pages (evidence: `AI-Desktop-Assistant/assistant.py`)
- Contact calling → Telephone handler: opens telephone link (evidence: `AI-Desktop-Assistant/assistant.py`)
- Battery status → Battery sensor API: reads sensor (evidence: `AI-Desktop-Assistant/assistant.py`)
- Weather lookup → wttr.in: fetches JSON (evidence: `AI-Desktop-Assistant/assistant.py`)
- Weather lookup → Spoken responses: speaks report (evidence: `AI-Desktop-Assistant/assistant.py`)
