# sanviitapralia/desktop-based-virtual-assistant-using-python-based-on-natural-language-processing architecture

> Architecture diagram of the GitHub repository sanviitapralia/desktop-based-virtual-assistant-using-python-based-on-natural-language-processing, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sanviitapralia/desktop-based-virtual-assistant-using-python-based-on-natural-language-processing
- Repository: https://github.com/sanviitapralia/desktop-based-virtual-assistant-using-python-based-on-natural-language-processing

## Overview

JARVIS is a Windows desktop voice-and-text assistant. Its main workflow accepts typed or recognised speech, handles exit/mode changes, maths and installed-app commands as fast paths, classifies remaining input, routes the intent to a tool, then prints and speaks the reply. Its documented capabilities also include persistent memory, web search, system and volume controls, and Hinglish normalisation. The README and sampled sources support the main stages; some entry-point and integration links are documented but not shown in source excerpts, so those links are dashed.

Main entry points: [`core/assistant.py`](https://github.com/sanviitapralia/desktop-based-virtual-assistant-using-python-based-on-natural-language-processing/blob/main/core/assistant.py) (Assistant workflow), [`core/router.py`](https://github.com/sanviitapralia/desktop-based-virtual-assistant-using-python-based-on-natural-language-processing/blob/main/core/router.py) (Intent router), [`tools/app_launcher.py`](https://github.com/sanviitapralia/desktop-based-virtual-assistant-using-python-based-on-natural-language-processing/blob/main/tools/app_launcher.py) (Installed app launcher), [`core/speech.py`](https://github.com/sanviitapralia/desktop-based-virtual-assistant-using-python-based-on-natural-language-processing/blob/main/core/speech.py) (Speech input)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interaction["Assistant interaction"]
  node_main["Application entry<br/>[main.py]"]
  node_assistant["Assistant workflow<br/>[assistant.py]"]
  node_speech["Speech input<br/>[speech.py]"]
  node_tts["Spoken replies<br/>[tts.py]"]
end

subgraph group_understanding["Language and intent"]
  node_classifier["Intent classifier<br/>[classifier.py]"]
  node_language["Hinglish normaliser<br/>[language.py]"]
  node_router["Intent router<br/>[router.py]"]
end

subgraph group_capabilities["Assistant capabilities"]
  node_math["Safe maths<br/>[math_engine.py]"]
  node_launcher["Installed app launcher<br/>[app_launcher.py]"]
  node_applications["Built-in applications<br/>[applications.py]"]
  node_browser["Websites and search<br/>[browser.py]"]
  node_system["System and volume<br/>[system.py]"]
end

subgraph group_state["Configuration and state"]
  node_memory["Memory store<br/>[memory.py]"]
  node_database[("SQLite memories<br/>[config.py]")]
  node_config["Runtime settings<br/>[config.py]"]
  node_logger["Logging<br/>[logger.py]"]
  node_model["Classifier artifacts<br/>[vocab.json]"]
end

node_user(("User"))
node_microphone(("Microphone"))
node_speech_service["Google recognition"]
node_desktop["Windows desktop"]
node_web["Web browser"]

node_user -.->|"starts assistant"| node_main
node_main -.->|"starts workflow"| node_assistant
node_assistant -->|"requests input"| node_speech
node_microphone -->|"provides audio"| node_speech
node_speech -->|"recognises audio"| node_speech_service
node_assistant -->|"detects language"| node_language
node_assistant -->|"checks maths"| node_math
node_math -->|"normalises text"| node_language
node_assistant -->|"checks app commands"| node_launcher
node_assistant -->|"classifies input"| node_classifier
node_classifier -->|"loads artifacts"| node_model
node_assistant -->|"routes intent"| node_router
node_router -->|"opens or closes"| node_applications
node_router -->|"opens or searches"| node_browser
node_router -->|"runs system actions"| node_system
node_router -.->|"reads or writes"| node_memory
node_memory -->|"reads or writes"| node_database
node_launcher -.->|"launches or closes apps"| node_desktop
node_launcher -.->|"opens URLs"| node_web
node_browser -->|"opens sites or search"| node_web
node_assistant -->|"delivers reply"| node_tts
node_tts -.->|"speaks reply"| node_user
node_assistant -->|"loads settings"| node_config
node_assistant -.->|"records events"| node_logger

click node_main "https://github.com/sanviitapralia/desktop-based-virtual-assistant-using-python-based-on-natural-language-processing/blob/main/main.py"
click node_assistant "https://github.com/sanviitapralia/desktop-based-virtual-assistant-using-python-based-on-natural-language-processing/blob/main/core/assistant.py"
click node_speech "https://github.com/sanviitapralia/desktop-based-virtual-assistant-using-python-based-on-natural-language-processing/blob/main/core/speech.py"
click node_tts "https://github.com/sanviitapralia/desktop-based-virtual-assistant-using-python-based-on-natural-language-processing/blob/main/core/tts.py"
click node_classifier "https://github.com/sanviitapralia/desktop-based-virtual-assistant-using-python-based-on-natural-language-processing/blob/main/core/classifier.py"
click node_language "https://github.com/sanviitapralia/desktop-based-virtual-assistant-using-python-based-on-natural-language-processing/blob/main/core/language.py"
click node_router "https://github.com/sanviitapralia/desktop-based-virtual-assistant-using-python-based-on-natural-language-processing/blob/main/core/router.py"
click node_math "https://github.com/sanviitapralia/desktop-based-virtual-assistant-using-python-based-on-natural-language-processing/blob/main/tools/math_engine.py"
click node_launcher "https://github.com/sanviitapralia/desktop-based-virtual-assistant-using-python-based-on-natural-language-processing/blob/main/tools/app_launcher.py"
click node_applications "https://github.com/sanviitapralia/desktop-based-virtual-assistant-using-python-based-on-natural-language-processing/blob/main/tools/applications.py"
click node_browser "https://github.com/sanviitapralia/desktop-based-virtual-assistant-using-python-based-on-natural-language-processing/blob/main/tools/browser.py"
click node_system "https://github.com/sanviitapralia/desktop-based-virtual-assistant-using-python-based-on-natural-language-processing/blob/main/tools/system.py"
click node_memory "https://github.com/sanviitapralia/desktop-based-virtual-assistant-using-python-based-on-natural-language-processing/blob/main/tools/memory.py"
click node_database "https://github.com/sanviitapralia/desktop-based-virtual-assistant-using-python-based-on-natural-language-processing/blob/main/config.py"
click node_config "https://github.com/sanviitapralia/desktop-based-virtual-assistant-using-python-based-on-natural-language-processing/blob/main/config.py"
click node_logger "https://github.com/sanviitapralia/desktop-based-virtual-assistant-using-python-based-on-natural-language-processing/blob/main/core/logger.py"
click node_model "https://github.com/sanviitapralia/desktop-based-virtual-assistant-using-python-based-on-natural-language-processing/blob/main/models/vocab.json"

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_assistant,node_speech,node_tts,node_user,node_web toneBlue
class node_classifier,node_language,node_router toneAmber
class node_math,node_launcher,node_applications,node_browser,node_system toneMint
class node_memory,node_database,node_config,node_logger,node_model toneRose
class node_microphone,node_speech_service,node_desktop toneIndigo
```

## Components

### Assistant interaction

- [Application entry](https://github.com/sanviitapralia/desktop-based-virtual-assistant-using-python-based-on-natural-language-processing/blob/main/main.py): `main.py`
- [Assistant workflow](https://github.com/sanviitapralia/desktop-based-virtual-assistant-using-python-based-on-natural-language-processing/blob/main/core/assistant.py): `core/assistant.py`
- [Speech input](https://github.com/sanviitapralia/desktop-based-virtual-assistant-using-python-based-on-natural-language-processing/blob/main/core/speech.py): `core/speech.py`
- [Spoken replies](https://github.com/sanviitapralia/desktop-based-virtual-assistant-using-python-based-on-natural-language-processing/blob/main/core/tts.py): `core/tts.py`

### Language and intent

- [Intent classifier](https://github.com/sanviitapralia/desktop-based-virtual-assistant-using-python-based-on-natural-language-processing/blob/main/core/classifier.py): `core/classifier.py`
- [Hinglish normaliser](https://github.com/sanviitapralia/desktop-based-virtual-assistant-using-python-based-on-natural-language-processing/blob/main/core/language.py): `core/language.py`
- [Intent router](https://github.com/sanviitapralia/desktop-based-virtual-assistant-using-python-based-on-natural-language-processing/blob/main/core/router.py): `core/router.py`

### Assistant capabilities

- [Safe maths](https://github.com/sanviitapralia/desktop-based-virtual-assistant-using-python-based-on-natural-language-processing/blob/main/tools/math_engine.py): `tools/math_engine.py`
- [Installed app launcher](https://github.com/sanviitapralia/desktop-based-virtual-assistant-using-python-based-on-natural-language-processing/blob/main/tools/app_launcher.py): `tools/app_launcher.py`
- [Built-in applications](https://github.com/sanviitapralia/desktop-based-virtual-assistant-using-python-based-on-natural-language-processing/blob/main/tools/applications.py): `tools/applications.py`
- [Websites and search](https://github.com/sanviitapralia/desktop-based-virtual-assistant-using-python-based-on-natural-language-processing/blob/main/tools/browser.py): `tools/browser.py`
- [System and volume](https://github.com/sanviitapralia/desktop-based-virtual-assistant-using-python-based-on-natural-language-processing/blob/main/tools/system.py): `tools/system.py`

### Configuration and state

- [Memory store](https://github.com/sanviitapralia/desktop-based-virtual-assistant-using-python-based-on-natural-language-processing/blob/main/tools/memory.py): `tools/memory.py`
- [SQLite memories](https://github.com/sanviitapralia/desktop-based-virtual-assistant-using-python-based-on-natural-language-processing/blob/main/config.py): `config.py`
- [Runtime settings](https://github.com/sanviitapralia/desktop-based-virtual-assistant-using-python-based-on-natural-language-processing/blob/main/config.py): `config.py`
- [Logging](https://github.com/sanviitapralia/desktop-based-virtual-assistant-using-python-based-on-natural-language-processing/blob/main/core/logger.py): `core/logger.py`
- [Classifier artifacts](https://github.com/sanviitapralia/desktop-based-virtual-assistant-using-python-based-on-natural-language-processing/blob/main/models/vocab.json): `models/vocab.json`

### Other components

- **User**
- **Microphone**
- **Google recognition**
- **Windows desktop**
- **Web browser**

## Connections

- User → Application entry: starts assistant (evidence: `README.md`)
- Application entry → Assistant workflow: starts workflow (evidence: `README.md`)
- Assistant workflow → Speech input: requests input (evidence: `core/assistant.py`)
- Microphone → Speech input: provides audio (evidence: `core/speech.py`)
- Speech input → Google recognition: recognises audio (evidence: `core/speech.py`)
- Assistant workflow → Hinglish normaliser: detects language (evidence: `core/assistant.py`)
- Assistant workflow → Safe maths: checks maths (evidence: `core/assistant.py`)
- Safe maths → Hinglish normaliser: normalises text (evidence: `tools/math_engine.py`)
- Assistant workflow → Installed app launcher: checks app commands (evidence: `core/assistant.py`)
- Assistant workflow → Intent classifier: classifies input (evidence: `core/assistant.py`)
- Intent classifier → Classifier artifacts: loads artifacts (evidence: `core/classifier.py`)
- Assistant workflow → Intent router: routes intent (evidence: `core/assistant.py`)
- Intent router → Built-in applications: opens or closes (evidence: `core/router.py`)
- Intent router → Websites and search: opens or searches (evidence: `core/router.py`)
- Intent router → System and volume: runs system actions (evidence: `core/router.py`)
- Intent router → Memory store: reads or writes (evidence: `core/router.py`)
- Memory store → SQLite memories: reads or writes (evidence: `tools/memory.py`)
- Installed app launcher → Windows desktop: launches or closes apps
- Installed app launcher → Web browser: opens URLs
- Websites and search → Web browser: opens sites or search (evidence: `tools/browser.py`)
- Assistant workflow → Spoken replies: delivers reply (evidence: `core/assistant.py`)
- Spoken replies → User: speaks reply (evidence: `README.md`)
- Assistant workflow → Runtime settings: loads settings (evidence: `core/assistant.py`)
- Assistant workflow → Logging: records events (evidence: `core/assistant.py`)
