# divyanshu1305/atc-recording-transcription architecture

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

- Interactive diagram: https://gitdiagram.com/divyanshu1305/atc-recording-transcription
- Repository: https://github.com/divyanshu1305/atc-recording-transcription

## Overview

This is an ATC-focused speech transcription product: users submit audio through a web console or run a CLI, and receive segmented transcripts with processing metadata and saved artifacts. The documented processing stages are audio cleanup, speech detection and chunking, then ASR; the API also persists results for history queries. Source excerpts establish the API-to-pipeline and API-to-database calls, while the README documents the stage order and capabilities. Some pipeline internals and frontend behavior are only partially sampled.

Main entry points: [`app.py`](https://github.com/divyanshu1305/atc-recording-transcription/blob/main/app.py) (FastAPI endpoints), [`frontend/src/components/transcribe.jsx`](https://github.com/divyanshu1305/atc-recording-transcription/blob/main/frontend/src/components/transcribe.jsx) (Transcription console), [`transcribe_atc.py`](https://github.com/divyanshu1305/atc-recording-transcription/blob/main/transcribe_atc.py) (Pipeline orchestration), [`run_transcription.py`](https://github.com/divyanshu1305/atc-recording-transcription/blob/main/run_transcription.py) (Batch transcription CLI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web console"]
  node_console["Transcription console<br/>[transcribe.jsx]"]
end

subgraph group_service["API and persistence"]
  node_api["FastAPI endpoints<br/>[app.py]"]
  node_history["History queries<br/>[app.py]"]
  node_sqlite[("Transcription store<br/>[database.py]")]
  node_artifacts["Audio and JSON artifacts<br/>[app.py]"]
end

subgraph group_pipeline["Transcription pipeline"]
  node_pipeline["Pipeline orchestration<br/>[transcribe_atc.py]"]
  node_cleanup["Audio cleanup<br/>[transcribe_atc.py]"]
  node_vadchunk["VAD and chunking<br/>[transcribe_atc.py]"]
  node_asr["ASR and biasing<br/>[transcribe_atc.py]"]
end

subgraph group_cli["Batch processing"]
  node_batch["Batch transcription CLI"]
end

node_operator(("Audio operator"))
node_engine{{"CrispASR executable"}}

node_operator -->|"submits audio"| node_console
node_console -->|"uploads audio"| node_api
node_api -->|"processes audio"| node_pipeline
node_pipeline -->|"preprocesses"| node_cleanup
node_cleanup -->|"feeds speech"| node_vadchunk
node_vadchunk -->|"feeds chunks"| node_asr
node_asr -->|"runs inference"| node_engine
node_api -->|"saves result"| node_sqlite
node_api -->|"serves queries"| node_history
node_history -->|"reads records"| node_sqlite
node_api -->|"writes artifacts"| node_artifacts
node_console -->|"fetches history"| node_history
node_console -->|"loads audio"| node_artifacts
node_operator -->|"runs batch job"| node_batch
node_batch -->|"uses pipeline"| node_pipeline

click node_console "https://github.com/divyanshu1305/atc-recording-transcription/blob/main/frontend/src/components/transcribe.jsx"
click node_api "https://github.com/divyanshu1305/atc-recording-transcription/blob/main/app.py"
click node_history "https://github.com/divyanshu1305/atc-recording-transcription/blob/main/app.py"
click node_sqlite "https://github.com/divyanshu1305/atc-recording-transcription/blob/main/database.py"
click node_pipeline "https://github.com/divyanshu1305/atc-recording-transcription/blob/main/transcribe_atc.py"
click node_cleanup "https://github.com/divyanshu1305/atc-recording-transcription/blob/main/transcribe_atc.py"
click node_vadchunk "https://github.com/divyanshu1305/atc-recording-transcription/blob/main/transcribe_atc.py"
click node_asr "https://github.com/divyanshu1305/atc-recording-transcription/blob/main/transcribe_atc.py"
click node_artifacts "https://github.com/divyanshu1305/atc-recording-transcription/blob/main/app.py"
click node_batch "https://github.com/divyanshu1305/atc-recording-transcription/blob/main/run_transcription.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_console toneBlue
class node_api,node_history,node_sqlite,node_artifacts toneAmber
class node_pipeline,node_cleanup,node_vadchunk,node_asr toneMint
class node_batch toneRose
class node_operator,node_engine toneIndigo
```

## Components

### Web console

- [Transcription console](https://github.com/divyanshu1305/atc-recording-transcription/blob/main/frontend/src/components/transcribe.jsx): `frontend/src/components/transcribe.jsx`

### API and persistence

- [FastAPI endpoints](https://github.com/divyanshu1305/atc-recording-transcription/blob/main/app.py): `app.py`
- [History queries](https://github.com/divyanshu1305/atc-recording-transcription/blob/main/app.py): `app.py`
- [Transcription store](https://github.com/divyanshu1305/atc-recording-transcription/blob/main/database.py): `database.py`
- [Audio and JSON artifacts](https://github.com/divyanshu1305/atc-recording-transcription/blob/main/app.py): `app.py`

### Transcription pipeline

- [Pipeline orchestration](https://github.com/divyanshu1305/atc-recording-transcription/blob/main/transcribe_atc.py): `transcribe_atc.py`
- [Audio cleanup](https://github.com/divyanshu1305/atc-recording-transcription/blob/main/transcribe_atc.py): `transcribe_atc.py`
- [VAD and chunking](https://github.com/divyanshu1305/atc-recording-transcription/blob/main/transcribe_atc.py): `transcribe_atc.py`
- [ASR and biasing](https://github.com/divyanshu1305/atc-recording-transcription/blob/main/transcribe_atc.py): `transcribe_atc.py`

### Batch processing

- [Batch transcription CLI](https://github.com/divyanshu1305/atc-recording-transcription/blob/main/run_transcription.py): `run_transcription.py`

### Other components

- **Audio operator**
- **CrispASR executable**

## Connections

- Audio operator → Transcription console: submits audio (evidence: `README.md`)
- Transcription console → FastAPI endpoints: uploads audio (evidence: `frontend/src/components/transcribe.jsx`)
- FastAPI endpoints → Pipeline orchestration: processes audio (evidence: `app.py`)
- Pipeline orchestration → Audio cleanup: preprocesses (evidence: `README.md`)
- Audio cleanup → VAD and chunking: feeds speech (evidence: `README.md`)
- VAD and chunking → ASR and biasing: feeds chunks (evidence: `README.md`)
- ASR and biasing → CrispASR executable: runs inference (evidence: `transcribe_atc.py`)
- FastAPI endpoints → Transcription store: saves result (evidence: `app.py`)
- FastAPI endpoints → History queries: serves queries (evidence: `app.py`)
- History queries → Transcription store: reads records (evidence: `app.py`)
- FastAPI endpoints → Audio and JSON artifacts: writes artifacts (evidence: `app.py`)
- Transcription console → History queries: fetches history (evidence: `frontend/src/components/transcribe.jsx`)
- Transcription console → Audio and JSON artifacts: loads audio (evidence: `frontend/src/components/transcribe.jsx`)
- Audio operator → Batch transcription CLI: runs batch job (evidence: `README.md`)
- Batch transcription CLI → Pipeline orchestration: uses pipeline (evidence: `run_transcription.py`)
