# san2003m/whsiper-atc architecture

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

- Interactive diagram: https://gitdiagram.com/san2003m/whsiper-atc
- Repository: https://github.com/san2003m/whsiper-atc

## Overview

Whisper-ATC is an ATC voice-recognition assistant. Its main workflow records audio on a desktop client, uploads it to a Flask service, transcribes it with the fine-tuned Whisper model, and stores the transcript and audio path in MariaDB. The README also documents web-based record viewing and statistics, but the corresponding implementation is not present in the sampled source; those capabilities are represented as documented functionality, not inferred routes. The graph focuses on evidenced runtime links.

Main entry points: [`server/web.py`](https://github.com/san2003m/whsiper-atc/blob/main/server/web.py) (Background processing), [`record/recorder.py`](https://github.com/san2003m/whsiper-atc/blob/main/record/recorder.py) (Recorder client), [`record/dummy_uploader.py`](https://github.com/san2003m/whsiper-atc/blob/main/record/dummy_uploader.py) (File uploader), [`server/db_query.py`](https://github.com/san2003m/whsiper-atc/blob/main/server/db_query.py) (MariaDB writer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_capture["Audio capture"]
  node_recorder["Recorder client<br/>[recorder.py]"]
  node_file_uploader["File uploader<br/>[dummy_uploader.py]"]
  node_audio_file["Recorded audio"]
end

subgraph group_ingest["Upload and processing"]
  node_upload_api["Upload endpoint<br/>[web.py]"]
  node_uploaded_audio["Uploaded audio<br/>[web.py]"]
  node_background_processor["Background processing<br/>[web.py]"]
  node_whisper_model["Fine-tuned Whisper"]
end

subgraph group_storage["Transcript storage"]
  node_transcript["ATC transcript<br/>[web.py]"]
  node_server_db_helper["MariaDB writer<br/>[db_query.py]"]
  node_record_db_helper["Record DB helper<br/>[db_query.py]"]
  node_mariadb[("MariaDB")]
end

subgraph group_web["Web access"]
  node_web_records["Record viewing"]
  node_statistics["Statistics view"]
end

node_operator(("ATC operator"))

node_operator -->|"records with"| node_recorder
node_recorder -->|"writes audio"| node_audio_file
node_recorder -->|"uploads audio"| node_upload_api
node_operator -->|"selects audio"| node_file_uploader
node_file_uploader -->|"uploads file"| node_upload_api
node_upload_api -->|"saves file"| node_uploaded_audio
node_upload_api -->|"starts thread"| node_background_processor
node_background_processor -->|"processes file"| node_uploaded_audio
node_background_processor -->|"transcribes with"| node_whisper_model
node_background_processor -->|"produces text"| node_transcript
node_background_processor -->|"calls writer"| node_server_db_helper
node_server_db_helper -->|"inserts row"| node_mariadb
node_record_db_helper -->|"writes SQL"| node_mariadb
node_mariadb -.->|"provides stored records"| node_web_records
node_web_records -.->|"offers statistics"| node_statistics

click node_recorder "https://github.com/san2003m/whsiper-atc/blob/main/record/recorder.py"
click node_file_uploader "https://github.com/san2003m/whsiper-atc/blob/main/record/dummy_uploader.py"
click node_upload_api "https://github.com/san2003m/whsiper-atc/blob/main/server/web.py"
click node_uploaded_audio "https://github.com/san2003m/whsiper-atc/blob/main/server/web.py"
click node_background_processor "https://github.com/san2003m/whsiper-atc/blob/main/server/web.py"
click node_transcript "https://github.com/san2003m/whsiper-atc/blob/main/server/web.py"
click node_server_db_helper "https://github.com/san2003m/whsiper-atc/blob/main/server/db_query.py"
click node_record_db_helper "https://github.com/san2003m/whsiper-atc/blob/main/record/db_query.py"
click node_web_records "https://github.com/san2003m/whsiper-atc/tree/main/server"
click node_statistics "https://github.com/san2003m/whsiper-atc/tree/main/server"

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_recorder,node_file_uploader,node_audio_file toneBlue
class node_upload_api,node_uploaded_audio,node_background_processor,node_whisper_model toneAmber
class node_transcript,node_server_db_helper,node_record_db_helper,node_mariadb toneMint
class node_web_records,node_statistics toneRose
class node_operator toneIndigo
```

## Components

### Audio capture

- [Recorder client](https://github.com/san2003m/whsiper-atc/blob/main/record/recorder.py): `record/recorder.py`
- [File uploader](https://github.com/san2003m/whsiper-atc/blob/main/record/dummy_uploader.py): `record/dummy_uploader.py`
- **Recorded audio**

### Upload and processing

- [Upload endpoint](https://github.com/san2003m/whsiper-atc/blob/main/server/web.py): `server/web.py`
- [Uploaded audio](https://github.com/san2003m/whsiper-atc/blob/main/server/web.py): `server/web.py`
- [Background processing](https://github.com/san2003m/whsiper-atc/blob/main/server/web.py): `server/web.py`
- **Fine-tuned Whisper**

### Transcript storage

- [ATC transcript](https://github.com/san2003m/whsiper-atc/blob/main/server/web.py): `server/web.py`
- [MariaDB writer](https://github.com/san2003m/whsiper-atc/blob/main/server/db_query.py): `server/db_query.py`
- [Record DB helper](https://github.com/san2003m/whsiper-atc/blob/main/record/db_query.py): `record/db_query.py`
- **MariaDB**

### Web access

- [Record viewing](https://github.com/san2003m/whsiper-atc/tree/main/server): `server`
- [Statistics view](https://github.com/san2003m/whsiper-atc/tree/main/server): `server`

### Other components

- **ATC operator**

## Connections

- ATC operator → Recorder client: records with (evidence: `README.md`)
- Recorder client → Recorded audio: writes audio (evidence: `record/recorder.py`)
- Recorder client → Upload endpoint: uploads audio (evidence: `record/recorder.py`)
- ATC operator → File uploader: selects audio (evidence: `record/dummy_uploader.py`)
- File uploader → Upload endpoint: uploads file (evidence: `record/dummy_uploader.py`)
- Upload endpoint → Uploaded audio: saves file (evidence: `server/web.py`)
- Upload endpoint → Background processing: starts thread (evidence: `server/web.py`)
- Background processing → Uploaded audio: processes file (evidence: `server/web.py`)
- Background processing → Fine-tuned Whisper: transcribes with (evidence: `server/web.py`)
- Background processing → ATC transcript: produces text (evidence: `server/web.py`)
- Background processing → MariaDB writer: calls writer (evidence: `server/web.py`)
- MariaDB writer → MariaDB: inserts row (evidence: `server/db_query.py`)
- Record DB helper → MariaDB: writes SQL (evidence: `record/db_query.py`)
- MariaDB → Record viewing: provides stored records (evidence: `README.md`)
- Record viewing → Statistics view: offers statistics (evidence: `README.md`)
