# yuanern/audio-summary architecture

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

- Interactive diagram: https://gitdiagram.com/yuanern/audio-summary
- Repository: https://github.com/yuanern/audio-summary

## Overview

This is a small desktop audio transcription and summarization app. The user selects an audio file, configures language/model/device and summary lengths, then transcribes or summarizes; results appear in the GUI and can be exported. The main runtime is in Whisper.py. The excerpts show the transcription and summary paths, file export, and history UI; other GUI details are inferred only where documented by the README.

Main entry points: [`Whisper.py`](https://github.com/yuanern/audio-summary/blob/main/Whisper.py) (Tkinter GUI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Desktop interface"]
  node_gui["Tkinter GUI<br/>[Whisper.py]"]
  node_selection["File selection and history<br/>[Whisper.py]"]
end

subgraph group_processing["Audio and text processing"]
  node_transcribe["Transcription workflow<br/>[Whisper.py]"]
  node_whisper["Whisper runtime"]
  node_summarize["Summary workflow<br/>[Whisper.py]"]
  node_bart["BART summarizer"]
end

subgraph group_results["Results"]
  node_display["Result display<br/>[Whisper.py]"]
  node_export["Text export<br/>[Whisper.py]"]
end

node_user(("User"))
node_file["Audio file"]
node_textfile["Exported text file"]

node_user -->|"uses"| node_gui
node_gui -->|"browses files"| node_selection
node_selection -->|"selects"| node_file
node_gui -->|"starts transcription"| node_transcribe
node_transcribe -->|"loads and transcribes"| node_whisper
node_whisper -->|"returns transcript"| node_transcribe
node_transcribe -->|"loads audio"| node_file
node_transcribe -->|"updates with transcript"| node_display
node_gui -->|"starts summary"| node_summarize
node_summarize -->|"transcribes if needed"| node_whisper
node_summarize -->|"summarizes text"| node_bart
node_summarize -->|"updates with summary"| node_display
node_gui -->|"exports result"| node_export
node_export -->|"reads text"| node_display
node_export -->|"writes"| node_textfile

click node_gui "https://github.com/yuanern/audio-summary/blob/main/Whisper.py"
click node_selection "https://github.com/yuanern/audio-summary/blob/main/Whisper.py"
click node_transcribe "https://github.com/yuanern/audio-summary/blob/main/Whisper.py"
click node_summarize "https://github.com/yuanern/audio-summary/blob/main/Whisper.py"
click node_display "https://github.com/yuanern/audio-summary/blob/main/Whisper.py"
click node_export "https://github.com/yuanern/audio-summary/blob/main/Whisper.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_gui,node_selection,node_user toneBlue
class node_transcribe,node_whisper,node_summarize,node_bart toneAmber
class node_display,node_export toneMint
class node_file,node_textfile toneIndigo
```

## Components

### Desktop interface

- [Tkinter GUI](https://github.com/yuanern/audio-summary/blob/main/Whisper.py): `Whisper.py`
- [File selection and history](https://github.com/yuanern/audio-summary/blob/main/Whisper.py): `Whisper.py`

### Audio and text processing

- [Transcription workflow](https://github.com/yuanern/audio-summary/blob/main/Whisper.py): `Whisper.py`
- **Whisper runtime**
- [Summary workflow](https://github.com/yuanern/audio-summary/blob/main/Whisper.py): `Whisper.py`
- **BART summarizer**

### Results

- [Result display](https://github.com/yuanern/audio-summary/blob/main/Whisper.py): `Whisper.py`
- [Text export](https://github.com/yuanern/audio-summary/blob/main/Whisper.py): `Whisper.py`

### Other components

- **User**
- **Audio file**
- **Exported text file**

## Connections

- User → Tkinter GUI: uses
- Tkinter GUI → File selection and history: browses files
- File selection and history → Audio file: selects
- Tkinter GUI → Transcription workflow: starts transcription
- Transcription workflow → Whisper runtime: loads and transcribes
- Whisper runtime → Transcription workflow: returns transcript
- Transcription workflow → Audio file: loads audio
- Transcription workflow → Result display: updates with transcript
- Tkinter GUI → Summary workflow: starts summary
- Summary workflow → Whisper runtime: transcribes if needed
- Summary workflow → BART summarizer: summarizes text
- Summary workflow → Result display: updates with summary
- Tkinter GUI → Text export: exports result
- Text export → Result display: reads text
- Text export → Exported text file: writes
