# thirumurugan240/reverse_engineered_voicetype architecture

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

- Interactive diagram: https://gitdiagram.com/thirumurugan240/reverse_engineered_voicetype
- Repository: https://github.com/thirumurugan240/reverse_engineered_voicetype

## Overview

VoiceType is an offline Windows dictation desktop app. The main workflow is: a user triggers dictation, VoiceType captures microphone audio, transcribes it with local Whisper, cleans the text, pastes it into the focused app, and records the session in history. The desktop UI exposes history, dictionary, and settings; a tray menu and status overlay provide background controls and feedback. The workflow stages are documented in the README, but many engine internals and the UI implementation were not sampled, so those links rely on README evidence or are omitted.

Main entry points: [`app/main.py`](https://github.com/thirumurugan240/reverse_engineered_voicetype/blob/main/app/main.py) (Desktop app), [`app/ui/index.html`](https://github.com/thirumurugan240/reverse_engineered_voicetype/blob/main/app/ui/index.html) (App interface), [`app/engine.py`](https://github.com/thirumurugan240/reverse_engineered_voicetype/blob/main/app/engine.py) (Dictation engine), [`app/overlay.py`](https://github.com/thirumurugan240/reverse_engineered_voicetype/blob/main/app/overlay.py) (Status overlay)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop shell"]
  node_desktop_app["Desktop app<br/>[main.py]"]
  node_tray["Tray controls<br/>[main.py]"]
  node_startup["Login startup<br/>[main.py]"]
end

subgraph group_dictation["Dictation workflow"]
  node_engine["Dictation engine<br/>[engine.py]"]
  node_hotkeys["Hotkey handling<br/>[engine.py]"]
  node_recorder["Audio capture<br/>[engine.py]"]
  node_whisper["Local transcription<br/>[engine.py]"]
  node_text_cleanup["Text cleanup<br/>[engine.py]"]
  node_text_insertion["Text insertion<br/>[engine.py]"]
end

subgraph group_data["Local data"]
  node_history[("Session history<br/>[engine.py]")]
  node_config["App configuration<br/>[engine.py]"]
end

subgraph group_interface["User interface"]
  node_overlay["Status overlay<br/>[overlay.py]"]
  node_ui["App interface<br/>[index.html]"]
  node_ui_api["UI API<br/>[main.py]"]
  node_home_history["Home and history<br/>[index.html]"]
  node_dictionary["Dictionary settings<br/>[index.html]"]
  node_settings["Settings pages<br/>[index.html]"]
end

node_user(("User"))
node_focused_app["Focused app"]

node_user -->|"triggers"| node_hotkeys
node_user -->|"uses"| node_ui
node_hotkeys -->|"starts capture"| node_recorder
node_recorder -->|"provides audio"| node_whisper
node_whisper -->|"returns transcript"| node_text_cleanup
node_text_cleanup -->|"provides text"| node_text_insertion
node_text_insertion -->|"pastes text"| node_focused_app
node_engine -->|"records sessions"| node_history
node_desktop_app -->|"creates and starts"| node_engine
node_desktop_app -->|"creates"| node_overlay
node_overlay -->|"subscribes to events"| node_engine
node_desktop_app -->|"opens"| node_ui
node_desktop_app -->|"exposes"| node_ui_api
node_ui_api -->|"controls"| node_engine
node_ui_api -->|"queries"| node_history
node_ui -->|"presents"| node_home_history
node_ui -->|"presents"| node_dictionary
node_ui -->|"presents"| node_settings
node_ui_api -->|"updates"| node_config
node_tray -->|"opens or quits"| node_desktop_app
node_tray -->|"toggles dictation"| node_engine
node_desktop_app -->|"creates"| node_tray
node_desktop_app -->|"configures"| node_startup

click node_desktop_app "https://github.com/thirumurugan240/reverse_engineered_voicetype/blob/main/app/main.py"
click node_tray "https://github.com/thirumurugan240/reverse_engineered_voicetype/blob/main/app/main.py"
click node_startup "https://github.com/thirumurugan240/reverse_engineered_voicetype/blob/main/app/main.py"
click node_engine "https://github.com/thirumurugan240/reverse_engineered_voicetype/blob/main/app/engine.py"
click node_hotkeys "https://github.com/thirumurugan240/reverse_engineered_voicetype/blob/main/app/engine.py"
click node_recorder "https://github.com/thirumurugan240/reverse_engineered_voicetype/blob/main/app/engine.py"
click node_whisper "https://github.com/thirumurugan240/reverse_engineered_voicetype/blob/main/app/engine.py"
click node_text_cleanup "https://github.com/thirumurugan240/reverse_engineered_voicetype/blob/main/app/engine.py"
click node_text_insertion "https://github.com/thirumurugan240/reverse_engineered_voicetype/blob/main/app/engine.py"
click node_overlay "https://github.com/thirumurugan240/reverse_engineered_voicetype/blob/main/app/overlay.py"
click node_ui "https://github.com/thirumurugan240/reverse_engineered_voicetype/blob/main/app/ui/index.html"
click node_ui_api "https://github.com/thirumurugan240/reverse_engineered_voicetype/blob/main/app/main.py"
click node_home_history "https://github.com/thirumurugan240/reverse_engineered_voicetype/blob/main/app/ui/index.html"
click node_dictionary "https://github.com/thirumurugan240/reverse_engineered_voicetype/blob/main/app/ui/index.html"
click node_settings "https://github.com/thirumurugan240/reverse_engineered_voicetype/blob/main/app/ui/index.html"
click node_history "https://github.com/thirumurugan240/reverse_engineered_voicetype/blob/main/app/engine.py"
click node_config "https://github.com/thirumurugan240/reverse_engineered_voicetype/blob/main/app/engine.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_desktop_app,node_tray,node_startup,node_user toneBlue
class node_engine,node_hotkeys,node_recorder,node_whisper,node_text_cleanup,node_text_insertion toneAmber
class node_history,node_config toneMint
class node_overlay,node_ui,node_ui_api,node_home_history,node_dictionary,node_settings toneRose
class node_focused_app toneIndigo
```

## Components

### Desktop shell

- [Desktop app](https://github.com/thirumurugan240/reverse_engineered_voicetype/blob/main/app/main.py): `app/main.py`
- [Tray controls](https://github.com/thirumurugan240/reverse_engineered_voicetype/blob/main/app/main.py): `app/main.py`
- [Login startup](https://github.com/thirumurugan240/reverse_engineered_voicetype/blob/main/app/main.py): `app/main.py`

### Dictation workflow

- [Dictation engine](https://github.com/thirumurugan240/reverse_engineered_voicetype/blob/main/app/engine.py): `app/engine.py`
- [Hotkey handling](https://github.com/thirumurugan240/reverse_engineered_voicetype/blob/main/app/engine.py): `app/engine.py`
- [Audio capture](https://github.com/thirumurugan240/reverse_engineered_voicetype/blob/main/app/engine.py): `app/engine.py`
- [Local transcription](https://github.com/thirumurugan240/reverse_engineered_voicetype/blob/main/app/engine.py): `app/engine.py`
- [Text cleanup](https://github.com/thirumurugan240/reverse_engineered_voicetype/blob/main/app/engine.py): `app/engine.py`
- [Text insertion](https://github.com/thirumurugan240/reverse_engineered_voicetype/blob/main/app/engine.py): `app/engine.py`

### Local data

- [Session history](https://github.com/thirumurugan240/reverse_engineered_voicetype/blob/main/app/engine.py): `app/engine.py`
- [App configuration](https://github.com/thirumurugan240/reverse_engineered_voicetype/blob/main/app/engine.py): `app/engine.py`

### User interface

- [Status overlay](https://github.com/thirumurugan240/reverse_engineered_voicetype/blob/main/app/overlay.py): `app/overlay.py`
- [App interface](https://github.com/thirumurugan240/reverse_engineered_voicetype/blob/main/app/ui/index.html): `app/ui/index.html`
- [UI API](https://github.com/thirumurugan240/reverse_engineered_voicetype/blob/main/app/main.py): `app/main.py`
- [Home and history](https://github.com/thirumurugan240/reverse_engineered_voicetype/blob/main/app/ui/index.html): `app/ui/index.html`
- [Dictionary settings](https://github.com/thirumurugan240/reverse_engineered_voicetype/blob/main/app/ui/index.html): `app/ui/index.html`
- [Settings pages](https://github.com/thirumurugan240/reverse_engineered_voicetype/blob/main/app/ui/index.html): `app/ui/index.html`

### Other components

- **User**
- **Focused app**

## Connections

- User → Hotkey handling: triggers (evidence: `README.md`)
- User → App interface: uses (evidence: `README.md`)
- Hotkey handling → Audio capture: starts capture (evidence: `README.md`)
- Audio capture → Local transcription: provides audio (evidence: `README.md`)
- Local transcription → Text cleanup: returns transcript (evidence: `README.md`)
- Text cleanup → Text insertion: provides text (evidence: `README.md`)
- Text insertion → Focused app: pastes text (evidence: `README.md`)
- Dictation engine → Session history: records sessions (evidence: `README.md`)
- Desktop app → Dictation engine: creates and starts (evidence: `app/main.py`)
- Desktop app → Status overlay: creates (evidence: `app/main.py`)
- Status overlay → Dictation engine: subscribes to events (evidence: `app/overlay.py`)
- Desktop app → App interface: opens (evidence: `app/main.py`)
- Desktop app → UI API: exposes (evidence: `app/main.py`)
- UI API → Dictation engine: controls (evidence: `app/main.py`)
- UI API → Session history: queries (evidence: `app/main.py`)
- App interface → Home and history: presents (evidence: `README.md`)
- App interface → Dictionary settings: presents (evidence: `README.md`)
- App interface → Settings pages: presents (evidence: `README.md`)
- UI API → App configuration: updates (evidence: `app/main.py`)
- Tray controls → Desktop app: opens or quits (evidence: `app/main.py`)
- Tray controls → Dictation engine: toggles dictation (evidence: `app/main.py`)
- Desktop app → Tray controls: creates (evidence: `app/main.py`)
- Desktop app → Login startup: configures (evidence: `app/main.py`)
