# kiran-0728/ai-assistant architecture

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

- Interactive diagram: https://gitdiagram.com/kiran-0728/ai-assistant
- Repository: https://github.com/kiran-0728/ai-assistant

## Overview

AI-Assistant is a Windows-oriented desktop personal assistant with GUI and voice-only entry modes. Users submit typed or spoken commands; the assistant interprets them and responds through text and speech while opening apps and websites, retrieving knowledge, playing music, or controlling system functions. The GUI and console engines overlap in capabilities, while the universal opener handles broad app and site launching. Edges reflect the entry-point and command-dispatch relationships shown in excerpts or documented in the README; unsampled details are not inferred.

Main entry points: [`AI_Assistant/Assistant_GUI.py`](https://github.com/kiran-0728/ai-assistant/blob/main/AI_Assistant/Assistant_GUI.py) (Command handling), [`AI_Assistant/Assistant.py`](https://github.com/kiran-0728/ai-assistant/blob/main/AI_Assistant/Assistant.py) (Voice command handling), [`AI_Assistant/opener.py`](https://github.com/kiran-0728/ai-assistant/blob/main/AI_Assistant/opener.py) (Universal opener), [`main.py`](https://github.com/kiran-0728/ai-assistant/blob/main/main.py) (Root entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entry and interaction"]
  node_root_entry["Root entry<br/>[main.py]"]
  node_inner_entry["Mode entry<br/>[main.py]"]
  node_desktop_gui["Desktop GUI<br/>[Assistant_GUI.py]"]
  node_voice_console["Voice console<br/>[Assistant.py]"]
end

subgraph group_assistant["Assistant capabilities"]
  node_command_handling["Command handling<br/>[Assistant_GUI.py]"]
  node_voice_command_handling["Voice command handling<br/>[Assistant.py]"]
  node_math["Math evaluation<br/>[Assistant.py]"]
  node_knowledge["Wikipedia knowledge<br/>[Assistant.py]"]
  node_music["YouTube playback<br/>[Assistant.py]"]
  node_web_search["Web search<br/>[Assistant.py]"]
end

subgraph group_launch["App and web launching"]
  node_opener["Universal opener<br/>[opener.py]"]
end

subgraph group_integrations["External and system services"]
  node_speech_recognition["Speech recognition"]
  node_speech_synthesis["Speech synthesis"]
  node_wikipedia_service["Wikipedia API"]
  node_youtube_service["YouTube"]
  node_web_browser["Web browser"]
  node_windows["Windows apps and controls"]
end

node_user(("User"))

node_user -->|"starts"| node_root_entry
node_root_entry -->|"launches GUI"| node_desktop_gui
node_root_entry -->|"launches voice mode"| node_voice_console
node_inner_entry -->|"launches GUI"| node_desktop_gui
node_inner_entry -->|"launches voice mode"| node_voice_console
node_user -->|"enters commands"| node_desktop_gui
node_desktop_gui -->|"submits typed commands"| node_command_handling
node_desktop_gui -->|"listens for speech"| node_speech_recognition
node_voice_console -->|"recognizes commands"| node_speech_recognition
node_voice_console -->|"dispatches commands"| node_voice_command_handling
node_command_handling -->|"evaluates expressions"| node_math
node_voice_command_handling -->|"evaluates expressions"| node_math
node_command_handling -->|"queries knowledge"| node_knowledge
node_voice_command_handling -->|"queries knowledge"| node_knowledge
node_knowledge -->|"requests summaries"| node_wikipedia_service
node_command_handling -->|"handles playback requests"| node_music
node_voice_command_handling -->|"handles playback requests"| node_music
node_music -->|"plays songs"| node_youtube_service
node_command_handling -->|"dispatches open requests"| node_opener
node_voice_command_handling -->|"dispatches open requests"| node_opener
node_opener -->|"launches apps"| node_windows
node_opener -->|"opens sites"| node_web_browser
node_command_handling -->|"handles search requests"| node_web_search
node_voice_command_handling -->|"handles search requests"| node_web_search
node_web_search -->|"opens search"| node_web_browser
node_command_handling -->|"controls system"| node_windows
node_voice_command_handling -->|"controls system"| node_windows
node_desktop_gui -->|"speaks responses"| node_speech_synthesis
node_voice_console -->|"speaks responses"| node_speech_synthesis

click node_root_entry "https://github.com/kiran-0728/ai-assistant/blob/main/main.py"
click node_inner_entry "https://github.com/kiran-0728/ai-assistant/blob/main/AI_Assistant/main.py"
click node_desktop_gui "https://github.com/kiran-0728/ai-assistant/blob/main/AI_Assistant/Assistant_GUI.py"
click node_voice_console "https://github.com/kiran-0728/ai-assistant/blob/main/AI_Assistant/Assistant.py"
click node_command_handling "https://github.com/kiran-0728/ai-assistant/blob/main/AI_Assistant/Assistant_GUI.py"
click node_voice_command_handling "https://github.com/kiran-0728/ai-assistant/blob/main/AI_Assistant/Assistant.py"
click node_math "https://github.com/kiran-0728/ai-assistant/blob/main/AI_Assistant/Assistant.py"
click node_knowledge "https://github.com/kiran-0728/ai-assistant/blob/main/AI_Assistant/Assistant.py"
click node_music "https://github.com/kiran-0728/ai-assistant/blob/main/AI_Assistant/Assistant.py"
click node_opener "https://github.com/kiran-0728/ai-assistant/blob/main/AI_Assistant/opener.py"
click node_web_search "https://github.com/kiran-0728/ai-assistant/blob/main/AI_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_root_entry,node_inner_entry,node_desktop_gui,node_voice_console,node_user toneBlue
class node_command_handling,node_voice_command_handling,node_math,node_knowledge,node_music,node_web_search toneAmber
class node_opener toneMint
class node_speech_recognition,node_speech_synthesis,node_wikipedia_service,node_youtube_service,node_web_browser,node_windows toneRose
```

## Components

### Entry and interaction

- [Root entry](https://github.com/kiran-0728/ai-assistant/blob/main/main.py): `main.py`
- [Mode entry](https://github.com/kiran-0728/ai-assistant/blob/main/AI_Assistant/main.py): `AI_Assistant/main.py`
- [Desktop GUI](https://github.com/kiran-0728/ai-assistant/blob/main/AI_Assistant/Assistant_GUI.py): `AI_Assistant/Assistant_GUI.py`
- [Voice console](https://github.com/kiran-0728/ai-assistant/blob/main/AI_Assistant/Assistant.py): `AI_Assistant/Assistant.py`

### Assistant capabilities

- [Command handling](https://github.com/kiran-0728/ai-assistant/blob/main/AI_Assistant/Assistant_GUI.py): `AI_Assistant/Assistant_GUI.py`
- [Voice command handling](https://github.com/kiran-0728/ai-assistant/blob/main/AI_Assistant/Assistant.py): `AI_Assistant/Assistant.py`
- [Math evaluation](https://github.com/kiran-0728/ai-assistant/blob/main/AI_Assistant/Assistant.py): `AI_Assistant/Assistant.py`
- [Wikipedia knowledge](https://github.com/kiran-0728/ai-assistant/blob/main/AI_Assistant/Assistant.py): `AI_Assistant/Assistant.py`
- [YouTube playback](https://github.com/kiran-0728/ai-assistant/blob/main/AI_Assistant/Assistant.py): `AI_Assistant/Assistant.py`
- [Web search](https://github.com/kiran-0728/ai-assistant/blob/main/AI_Assistant/Assistant.py): `AI_Assistant/Assistant.py`

### App and web launching

- [Universal opener](https://github.com/kiran-0728/ai-assistant/blob/main/AI_Assistant/opener.py): `AI_Assistant/opener.py`

### External and system services

- **Speech recognition**
- **Speech synthesis**
- **Wikipedia API**
- **YouTube**
- **Web browser**
- **Windows apps and controls**

### Other components

- **User**

## Connections

- User → Root entry: starts (evidence: `README.md`)
- Root entry → Desktop GUI: launches GUI (evidence: `main.py`)
- Root entry → Voice console: launches voice mode (evidence: `main.py`)
- Mode entry → Desktop GUI: launches GUI (evidence: `AI_Assistant/main.py`)
- Mode entry → Voice console: launches voice mode (evidence: `AI_Assistant/main.py`)
- User → Desktop GUI: enters commands (evidence: `README.md`)
- Desktop GUI → Command handling: submits typed commands (evidence: `AI_Assistant/Assistant_GUI.py`)
- Desktop GUI → Speech recognition: listens for speech (evidence: `README.md`)
- Voice console → Speech recognition: recognizes commands (evidence: `AI_Assistant/Assistant.py`)
- Voice console → Voice command handling: dispatches commands (evidence: `AI_Assistant/Assistant.py`)
- Command handling → Math evaluation: evaluates expressions (evidence: `AI_Assistant/Assistant_GUI.py`)
- Voice command handling → Math evaluation: evaluates expressions (evidence: `AI_Assistant/Assistant.py`)
- Command handling → Wikipedia knowledge: queries knowledge (evidence: `AI_Assistant/Assistant_GUI.py`)
- Voice command handling → Wikipedia knowledge: queries knowledge (evidence: `AI_Assistant/Assistant.py`)
- Wikipedia knowledge → Wikipedia API: requests summaries (evidence: `AI_Assistant/Assistant.py`)
- Command handling → YouTube playback: handles playback requests (evidence: `AI_Assistant/Assistant_GUI.py`)
- Voice command handling → YouTube playback: handles playback requests (evidence: `AI_Assistant/Assistant.py`)
- YouTube playback → YouTube: plays songs (evidence: `AI_Assistant/Assistant.py`)
- Command handling → Universal opener: dispatches open requests (evidence: `AI_Assistant/Assistant_GUI.py`)
- Voice command handling → Universal opener: dispatches open requests (evidence: `AI_Assistant/Assistant.py`)
- Universal opener → Windows apps and controls: launches apps (evidence: `AI_Assistant/opener.py`)
- Universal opener → Web browser: opens sites (evidence: `AI_Assistant/opener.py`)
- Command handling → Web search: handles search requests (evidence: `AI_Assistant/Assistant_GUI.py`)
- Voice command handling → Web search: handles search requests (evidence: `AI_Assistant/Assistant.py`)
- Web search → Web browser: opens search (evidence: `AI_Assistant/Assistant.py`)
- Command handling → Windows apps and controls: controls system (evidence: `README.md`)
- Voice command handling → Windows apps and controls: controls system (evidence: `AI_Assistant/Assistant.py`)
- Desktop GUI → Speech synthesis: speaks responses (evidence: `README.md`)
- Voice console → Speech synthesis: speaks responses (evidence: `AI_Assistant/Assistant.py`)
