# warfernal/jarvis-desktop-voice-assistant architecture

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

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

## Overview

##### Project type and purpose
- This is a desktop voice-activated assistant (“Jarvis”) implemented as a single Python application.
- Purpose: listen for voice commands, recognize intent, and automate tasks on a user’s local machine (e.g., open apps, search Wikipedia, play music, take notes, screenshots).

##### File structure
- Top-level:
- Jarvis/
– jarvis.py (main entrypoint)
– data.txt (persistent note storage)
- Requirements.txt (Python dependencies)
- README.md + docs in Images/ and Presentation/
- No microservices—this is a monolithic script. It imports libraries (speech_recognition, pyttsx3, wikipedia, pyautogui, etc.) and orchestrates them in one codebase.

##### Extract key functionality from the README
- Core features: greeting, time/date queries, launching applications, opening websites, Wikipedia lookups, Google searches, music playback, note-taking, screenshots.
- Dependencies hint at modules: PyAudio (audio I/O), SpeechRecognition (ASR), pyttsx3 (TTS), webbrowser, os/subprocess, pyautogui, datetime.

##### Detail
- Conditional dispatch flow (e.g., “if ‘Wikipedia’ in text → Wikipedia Module”).
- Dependency on Requirements.txt for reproducing environment.

## Diagram (Mermaid)

```mermaid
graph TB
    %% Input Layer
    subgraph "Input Layer"
        Mic(("Microphone")):::hardware
        PyAudio["PyAudio Stream"]:::hardware
    end

    %% ASR and Core Processing
    subgraph "Core Processing" 
        ASR["Speech Recognition\n(speech_recognition)"]:::core
        Parser["Command Parser/\nDispatcher (jarvis.py)"]:::core
        Intent["Intent Matcher\n(keywords/logic)"]:::core
    end

    %% Action Modules
    subgraph "Action Modules"
        OSA["OS Automation Module\n(os, subprocess)"]:::module
        WA["Web Automation Module\n(webbrowser, requests)"]:::module
        Wiki["Wikipedia Module\n(wikipedia API)"]:::module
        Media["Media Module\n(playsound)"]:::module
        Notes["Note-Taking Module\n(reads/writes data.txt)"]:::module
        SS["Screenshot Module\n(pyautogui)"]:::module
    end

    %% Data Store
    DataStore[(data.txt)]:::datastore

    %% External Services
    subgraph "External Services"
        WikiAPI[(Wikipedia API)]:::external
        Google[(Google Search Web)]:::external
    end

    %% Output Layer
    subgraph "Output Layer"
        TTS["TTS Engine\n(pyttsx3)"]:::core
        Speaker(("Speaker")):::hardware
    end

    %% Documentation & Assets
    subgraph "Documentation & Assets"
        Req["Requirements.txt"]:::docs
        README["README.md"]:::docs
        JarvisDocs["Jarvis/README.md"]:::docs
        PresPPT["Project Presentation.pptx"]:::docs
        PresReadme["Presentation/README.md"]:::docs
        ImagesDoc["Images/README.md"]:::docs
        License["LICENSE"]:::docs
    end

    %% Connections
    Mic --> PyAudio
    PyAudio --> ASR
    ASR --> Parser
    Parser --> Intent

    Intent --> OSA
    Intent --> WA
    Intent --> Wiki
    Intent --> Media
    Intent --> Notes
    Intent --> SS

    Notes --> DataStore
    Wiki --> WikiAPI
    WA --> Google

    OSA --> TTS
    WA --> TTS
    Wiki --> TTS
    Media --> TTS
    Notes --> TTS
    SS --> TTS

    TTS --> Speaker

    %% Click Events
    click Parser "https://github.com/warfernal/jarvis-desktop-voice-assistant/blob/main/Jarvis/jarvis.py"
    click DataStore "https://github.com/warfernal/jarvis-desktop-voice-assistant/blob/main/Jarvis/data.txt"
    click Req "https://github.com/warfernal/jarvis-desktop-voice-assistant/blob/main/Requirements.txt"
    click README "https://github.com/warfernal/jarvis-desktop-voice-assistant/blob/main/README.md"
    click JarvisDocs "https://github.com/warfernal/jarvis-desktop-voice-assistant/blob/main/Jarvis/README.md"
    click PresPPT "https://github.com/warfernal/jarvis-desktop-voice-assistant/blob/main/Presentation/18038004007 Kishan Project Presentation.pptx"
    click PresReadme "https://github.com/warfernal/jarvis-desktop-voice-assistant/blob/main/Presentation/README.md"
    click ImagesDoc "https://github.com/warfernal/jarvis-desktop-voice-assistant/blob/main/Images/README.md"
    click License "https://github.com/warfernal/jarvis-desktop-voice-assistant/tree/main/LICENSE"

    %% Styles
    classDef hardware fill:#D0E6FF,stroke:#0366D6,color:#0366D6,stroke-width:2px,stroke-dasharray: 5 5;
    classDef core fill:#E6FFE6,stroke:#237A23,color:#237A23,stroke-width:2px;
    classDef module fill:#FFF4E6,stroke:#CC8400,color:#CC8400,stroke-width:2px;
    classDef datastore fill:#F2E6FF,stroke:#7A23A8,color:#7A23A8,stroke-width:2px,stroke-dasharray: 5 5;
    classDef external fill:#FFE6F2,stroke:#A82356,color:#A82356,stroke-width:2px;
    classDef docs fill:#F0F0F0,stroke:#666666,color:#333333,stroke-width:1px,stroke-dasharray: 2 2;

    %% Legend
    subgraph "Legend"
        A1("Hardware (Mic/Speaker)"):::hardware
        A2("Core Processing"):::core
        A3("Action Modules"):::module
        A4("Data Store"):::datastore
        A5("External Services"):::external
        A6("Documentation & Assets"):::docs
    end
```
