# vishnukaribandi25-spec/friday_version2 architecture

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

- Interactive diagram: https://gitdiagram.com/vishnukaribandi25-spec/friday_version2
- Repository: https://github.com/vishnukaribandi25-spec/friday_version2

## Overview

FRIDAY is a voice-controlled desktop assistant. Its runtime loop listens for a wake word, captures a command, routes it to an action or a time/date response, and speaks back. The main loop and command dispatch are shown in the excerpts; external audio and operating-system interactions are described in source comments. The README is only a title, so capability details come from the sampled source.

Main entry points: [`friday-v2/friday_app/voice.py`](https://github.com/vishnukaribandi25-spec/friday_version2/blob/main/friday-v2/friday_app/voice.py) (Speech I/O), [`friday-v2/friday_app/app.py`](https://github.com/vishnukaribandi25-spec/friday_version2/blob/main/friday-v2/friday_app/app.py) (Assistant loop), [`friday-v2/friday_app/router.py`](https://github.com/vishnukaribandi25-spec/friday_version2/blob/main/friday-v2/friday_app/router.py) (Command router), [`friday-v2/friday_app/actions.py`](https://github.com/vishnukaribandi25-spec/friday_version2/blob/main/friday-v2/friday_app/actions.py) (Desktop actions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Assistant runtime"]
  node_entry["Program entry<br/>[run_friday.py]"]
  node_loop["Assistant loop<br/>[app.py]"]
end

subgraph group_commands["Command handling"]
  node_settings["Assistant settings<br/>[config.py]"]
  node_router["Command router<br/>[router.py]"]
  node_actions["Desktop actions<br/>[actions.py]"]
end

subgraph group_io["Voice and desktop I/O"]
  node_voice["Speech I/O<br/>[voice.py]"]
end

node_user(("User"))
node_microphone(("Microphone"))
node_speech_api["Google speech API"]
node_speakers(("Audio output"))
node_desktop["Desktop environment"]
node_browser["Default browser"]

node_user -->|"speaks into"| node_microphone
node_entry -->|"starts"| node_loop
node_loop -->|"listens and speaks"| node_voice
node_loop -->|"checks wake word"| node_settings
node_loop -->|"routes command"| node_router
node_router -->|"matches phrases"| node_settings
node_router -->|"dispatches action"| node_actions
node_router -->|"speaks response"| node_voice
node_actions -->|"reports result"| node_voice
node_voice -->|"captures audio"| node_microphone
node_voice -->|"recognizes speech"| node_speech_api
node_voice -->|"plays speech"| node_speakers
node_actions -->|"launches or opens"| node_desktop
node_actions -->|"opens website"| node_browser

click node_entry "https://github.com/vishnukaribandi25-spec/friday_version2/blob/main/friday-v2/run_friday.py"
click node_loop "https://github.com/vishnukaribandi25-spec/friday_version2/blob/main/friday-v2/friday_app/app.py"
click node_settings "https://github.com/vishnukaribandi25-spec/friday_version2/blob/main/friday-v2/friday_app/config.py"
click node_router "https://github.com/vishnukaribandi25-spec/friday_version2/blob/main/friday-v2/friday_app/router.py"
click node_actions "https://github.com/vishnukaribandi25-spec/friday_version2/blob/main/friday-v2/friday_app/actions.py"
click node_voice "https://github.com/vishnukaribandi25-spec/friday_version2/blob/main/friday-v2/friday_app/voice.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_entry,node_loop,node_user,node_browser toneBlue
class node_settings,node_router,node_actions toneAmber
class node_voice,node_speech_api toneMint
class node_microphone,node_speakers,node_desktop toneIndigo
```

## Components

### Assistant runtime

- [Program entry](https://github.com/vishnukaribandi25-spec/friday_version2/blob/main/friday-v2/run_friday.py): `friday-v2/run_friday.py`
- [Assistant loop](https://github.com/vishnukaribandi25-spec/friday_version2/blob/main/friday-v2/friday_app/app.py): `friday-v2/friday_app/app.py`

### Command handling

- [Assistant settings](https://github.com/vishnukaribandi25-spec/friday_version2/blob/main/friday-v2/friday_app/config.py): `friday-v2/friday_app/config.py`
- [Command router](https://github.com/vishnukaribandi25-spec/friday_version2/blob/main/friday-v2/friday_app/router.py): `friday-v2/friday_app/router.py`
- [Desktop actions](https://github.com/vishnukaribandi25-spec/friday_version2/blob/main/friday-v2/friday_app/actions.py): `friday-v2/friday_app/actions.py`

### Voice and desktop I/O

- [Speech I/O](https://github.com/vishnukaribandi25-spec/friday_version2/blob/main/friday-v2/friday_app/voice.py): `friday-v2/friday_app/voice.py`

### Other components

- **User**
- **Microphone**
- **Google speech API**
- **Audio output**
- **Desktop environment**
- **Default browser**

## Connections

- User → Microphone: speaks into
- Program entry → Assistant loop: starts (evidence: `friday-v2/run_friday.py`)
- Assistant loop → Speech I/O: listens and speaks (evidence: `friday-v2/friday_app/app.py`)
- Assistant loop → Assistant settings: checks wake word (evidence: `friday-v2/friday_app/app.py`)
- Assistant loop → Command router: routes command (evidence: `friday-v2/friday_app/app.py`)
- Command router → Assistant settings: matches phrases (evidence: `friday-v2/friday_app/router.py`)
- Command router → Desktop actions: dispatches action (evidence: `friday-v2/friday_app/router.py`)
- Command router → Speech I/O: speaks response (evidence: `friday-v2/friday_app/router.py`)
- Desktop actions → Speech I/O: reports result (evidence: `friday-v2/friday_app/actions.py`)
- Speech I/O → Microphone: captures audio (evidence: `friday-v2/friday_app/voice.py`)
- Speech I/O → Google speech API: recognizes speech (evidence: `friday-v2/friday_app/voice.py`)
- Speech I/O → Audio output: plays speech (evidence: `friday-v2/friday_app/voice.py`)
- Desktop actions → Desktop environment: launches or opens (evidence: `friday-v2/friday_app/actions.py`)
- Desktop actions → Default browser: opens website (evidence: `friday-v2/friday_app/actions.py`)
