# lordspudnik/doctorvoicenotes architecture

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

- Interactive diagram: https://gitdiagram.com/lordspudnik/doctorvoicenotes
- Repository: https://github.com/lordspudnik/doctorvoicenotes

## Overview

Doctor Voice Notes is an offline desktop dictation app: a clinician starts recording in the UI, speech is captured and transcribed locally, recognized phrases are interpreted as dictation or voice commands, and the document writer saves the resulting notes to Word. The UI also exposes settings for microphone and document behavior. The graph follows the documented and indexed wiring; several internal details were not sampled, so uncertain implementation links are omitted.

Main entry points: [`src/ui/main_window.py`](https://github.com/lordspudnik/doctorvoicenotes/blob/main/src/ui/main_window.py) (Main window), [`src/utils/config_manager.py`](https://github.com/lordspudnik/doctorvoicenotes/blob/main/src/utils/config_manager.py) (Settings manager), [`main.py`](https://github.com/lordspudnik/doctorvoicenotes/blob/main/main.py) (App startup), [`src/document/writer.py`](https://github.com/lordspudnik/doctorvoicenotes/blob/main/src/document/writer.py) (Word document writer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Desktop app"]
  node_entry["App startup<br/>[main.py]"]
  node_window["Main window<br/>[main_window.py]"]
  node_settings_ui["Settings dialog<br/>[settings_dialog.py]"]
end

subgraph group_speech["Speech pipeline"]
  node_mic["Microphone capture<br/>[recorder.py]"]
  node_transcription["Speech recognition<br/>[engine.py]"]
  node_model["Local speech model<br/>[small.en]"]
end

subgraph group_notes["Notes workflow"]
  node_commands["Voice commands<br/>[voice_commands.py]"]
  node_writer["Word document writer<br/>[writer.py]"]
  node_notes_files["Saved notes"]
end

subgraph group_settings["Settings and paths"]
  node_config["Settings manager<br/>[config_manager.py]"]
  node_settings_file["Local settings<br/>[settings.json]"]
  node_paths["Path resolution<br/>[paths.py]"]
end

subgraph group_operations["Local operations"]
  node_logger["Logging<br/>[logger.py]"]
  node_log_files["Local logs"]
end

node_clinician(("Clinician"))
node_audio_device["Microphone device"]

node_clinician -->|"uses"| node_window
node_entry -->|"loads settings"| node_config
node_entry -->|"starts"| node_window
node_window -->|"controls capture"| node_mic
node_audio_device -.->|"provides audio"| node_mic
node_window -->|"coordinates"| node_transcription
node_transcription -->|"loads locally"| node_model
node_window -->|"processes phrases"| node_commands
node_window -->|"controls saves"| node_writer
node_writer -->|"reads pending text"| node_commands
node_writer -->|"writes documents"| node_notes_files
node_window -->|"opens settings"| node_settings_ui
node_settings_ui -->|"updates settings"| node_config
node_config -->|"loads and saves"| node_settings_file
node_config -->|"resolves config path"| node_paths
node_entry -->|"initializes"| node_logger
node_logger -->|"resolves log path"| node_paths
node_logger -->|"writes logs"| node_log_files

click node_entry "https://github.com/lordspudnik/doctorvoicenotes/blob/main/main.py"
click node_window "https://github.com/lordspudnik/doctorvoicenotes/blob/main/src/ui/main_window.py"
click node_settings_ui "https://github.com/lordspudnik/doctorvoicenotes/blob/main/src/ui/settings_dialog.py"
click node_mic "https://github.com/lordspudnik/doctorvoicenotes/blob/main/src/audio/recorder.py"
click node_transcription "https://github.com/lordspudnik/doctorvoicenotes/blob/main/src/transcription/engine.py"
click node_model "https://github.com/lordspudnik/doctorvoicenotes/tree/main/models/small.en"
click node_commands "https://github.com/lordspudnik/doctorvoicenotes/blob/main/src/commands/voice_commands.py"
click node_writer "https://github.com/lordspudnik/doctorvoicenotes/blob/main/src/document/writer.py"
click node_notes_files "https://github.com/lordspudnik/doctorvoicenotes/tree/main/notes"
click node_config "https://github.com/lordspudnik/doctorvoicenotes/blob/main/src/utils/config_manager.py"
click node_settings_file "https://github.com/lordspudnik/doctorvoicenotes/blob/main/config/settings.json"
click node_paths "https://github.com/lordspudnik/doctorvoicenotes/blob/main/src/utils/paths.py"
click node_logger "https://github.com/lordspudnik/doctorvoicenotes/blob/main/src/utils/logger.py"
click node_log_files "https://github.com/lordspudnik/doctorvoicenotes/tree/main/logs"

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_window,node_settings_ui toneBlue
class node_mic,node_transcription,node_model toneAmber
class node_commands,node_writer,node_notes_files toneMint
class node_config,node_settings_file,node_paths toneRose
class node_logger,node_log_files,node_clinician,node_audio_device toneIndigo
```

## Components

### Desktop app

- [App startup](https://github.com/lordspudnik/doctorvoicenotes/blob/main/main.py): `main.py`
- [Main window](https://github.com/lordspudnik/doctorvoicenotes/blob/main/src/ui/main_window.py): `src/ui/main_window.py`
- [Settings dialog](https://github.com/lordspudnik/doctorvoicenotes/blob/main/src/ui/settings_dialog.py): `src/ui/settings_dialog.py`

### Speech pipeline

- [Microphone capture](https://github.com/lordspudnik/doctorvoicenotes/blob/main/src/audio/recorder.py): `src/audio/recorder.py`
- [Speech recognition](https://github.com/lordspudnik/doctorvoicenotes/blob/main/src/transcription/engine.py): `src/transcription/engine.py`
- [Local speech model](https://github.com/lordspudnik/doctorvoicenotes/tree/main/models/small.en): `models/small.en`

### Notes workflow

- [Voice commands](https://github.com/lordspudnik/doctorvoicenotes/blob/main/src/commands/voice_commands.py): `src/commands/voice_commands.py`
- [Word document writer](https://github.com/lordspudnik/doctorvoicenotes/blob/main/src/document/writer.py): `src/document/writer.py`
- [Saved notes](https://github.com/lordspudnik/doctorvoicenotes/tree/main/notes): `notes`

### Settings and paths

- [Settings manager](https://github.com/lordspudnik/doctorvoicenotes/blob/main/src/utils/config_manager.py): `src/utils/config_manager.py`
- [Local settings](https://github.com/lordspudnik/doctorvoicenotes/blob/main/config/settings.json): `config/settings.json`
- [Path resolution](https://github.com/lordspudnik/doctorvoicenotes/blob/main/src/utils/paths.py): `src/utils/paths.py`

### Local operations

- [Logging](https://github.com/lordspudnik/doctorvoicenotes/blob/main/src/utils/logger.py): `src/utils/logger.py`
- [Local logs](https://github.com/lordspudnik/doctorvoicenotes/tree/main/logs): `logs`

### Other components

- **Clinician**
- **Microphone device**

## Connections

- Clinician → Main window: uses (evidence: `README.md`)
- App startup → Settings manager: loads settings (evidence: `main.py`)
- App startup → Main window: starts (evidence: `main.py`)
- Main window → Microphone capture: controls capture (evidence: `src/ui/main_window.py`)
- Microphone device → Microphone capture: provides audio (evidence: `src/audio/recorder.py`)
- Main window → Speech recognition: coordinates (evidence: `src/ui/main_window.py`)
- Speech recognition → Local speech model: loads locally (evidence: `src/transcription/engine.py`)
- Main window → Voice commands: processes phrases (evidence: `src/ui/main_window.py`)
- Main window → Word document writer: controls saves (evidence: `src/ui/main_window.py`)
- Word document writer → Voice commands: reads pending text (evidence: `src/commands/voice_commands.py`)
- Word document writer → Saved notes: writes documents (evidence: `src/document/writer.py`)
- Main window → Settings dialog: opens settings (evidence: `src/ui/main_window.py`)
- Settings dialog → Settings manager: updates settings (evidence: `src/ui/settings_dialog.py`)
- Settings manager → Local settings: loads and saves (evidence: `src/utils/config_manager.py`)
- Settings manager → Path resolution: resolves config path (evidence: `src/utils/config_manager.py`)
- App startup → Logging: initializes (evidence: `main.py`)
- Logging → Path resolution: resolves log path (evidence: `src/utils/logger.py`)
- Logging → Local logs: writes logs (evidence: `src/utils/logger.py`)
