# rbbobby/audio-text-manager-desktop architecture

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

- Interactive diagram: https://gitdiagram.com/rbbobby/audio-text-manager-desktop
- Repository: https://github.com/rbbobby/audio-text-manager-desktop

## Overview

Audio Text Manager is a local Wails desktop app for audio/video transcription and summarization. The main workflow is file selection, audio normalization, queued background processing, Whisper transcription (optionally with speaker labeling), and llama.cpp summarization, with results and job history stored locally. Settings, runtime checks, export, and reprocessing are additional product capabilities. Some connections are documented in the README or visible through the source index; unsampled frontend and subsystem internals are represented only at paths supported by the tree.

Main entry points: [`internal/pipeline/pipeline.go`](https://github.com/rbbobby/audio-text-manager-desktop/blob/main/internal/pipeline/pipeline.go) (Job worker), [`app.go`](https://github.com/rbbobby/audio-text-manager-desktop/blob/main/app.go) (Wails app API), [`internal/asr/models.go`](https://github.com/rbbobby/audio-text-manager-desktop/blob/main/internal/asr/models.go) (ASR models), [`internal/sidecar/sidecar.go`](https://github.com/rbbobby/audio-text-manager-desktop/blob/main/internal/sidecar/sidecar.go) (Runtime discovery)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop interface"]
  node_frontend["Desktop UI<br/>[app.js]"]
  node_app["Wails app API<br/>[app.go]"]
  node_settings["Settings<br/>[config.go]"]
end

subgraph group_workflow["Job workflow"]
  node_worker["Job worker<br/>[pipeline.go]"]
  node_jobs[("Job history<br/>[store.go]")]
  node_media["Audio preparation<br/>[media.go]"]
  node_datafolder["App data location<br/>[appdir.go]"]
end

subgraph group_speech["Speech processing"]
  node_asrmodels["ASR models<br/>[models.go]"]
  node_transcription["Whisper transcription<br/>[whisper.go]"]
  node_segments["Transcript segments<br/>[segments.go]"]
  node_diarization["Speaker labeling<br/>[diarize.go]"]
  node_flavor["Build flavor options<br/>[flavor.go]"]
end

subgraph group_localruntime["Local runtime"]
  node_summary["Summary generation<br/>[ollama.go]"]
  node_llmmodel["Summary model<br/>[model.go]"]
  node_llmserver["llama.cpp server<br/>[server.go]"]
  node_sidecar["Runtime discovery<br/>[sidecar.go]"]
  node_download["Model downloads<br/>[download.go]"]
end

node_user(("Desktop user"))

node_user -->|"uses"| node_frontend
node_frontend -->|"invokes"| node_app
node_app -->|"starts"| node_worker
node_app -->|"manages jobs"| node_jobs
node_app -->|"prepares uploads"| node_media
node_app -->|"loads settings"| node_settings
node_app -->|"initializes data"| node_datafolder
node_worker -->|"claims and updates"| node_jobs
node_worker -->|"reads snapshot"| node_settings
node_worker -->|"ensures weights"| node_asrmodels
node_worker -->|"transcribes audio"| node_transcription
node_transcription -->|"parses output"| node_segments
node_transcription -->|"assigns speakers"| node_diarization
node_worker -->|"selects diarization"| node_flavor
node_worker -->|"ensures model"| node_llmmodel
node_worker -->|"starts server"| node_llmserver
node_worker -->|"requests summary"| node_summary
node_llmserver -->|"prepares process"| node_sidecar
node_llmmodel -->|"searches bundled model"| node_sidecar
node_llmmodel -->|"downloads missing model"| node_download
node_asrmodels -->|"checks preset"| node_flavor
node_asrmodels -->|"searches bundled weights"| node_sidecar
node_asrmodels -->|"downloads missing weights"| node_download
node_media -->|"resolves tools"| node_sidecar
node_jobs -.->|"stores SQLite data"| node_datafolder

click node_frontend "https://github.com/rbbobby/audio-text-manager-desktop/blob/main/frontend/dist/app.js"
click node_app "https://github.com/rbbobby/audio-text-manager-desktop/blob/main/app.go"
click node_settings "https://github.com/rbbobby/audio-text-manager-desktop/blob/main/internal/config/config.go"
click node_worker "https://github.com/rbbobby/audio-text-manager-desktop/blob/main/internal/pipeline/pipeline.go"
click node_jobs "https://github.com/rbbobby/audio-text-manager-desktop/blob/main/internal/jobs/store.go"
click node_media "https://github.com/rbbobby/audio-text-manager-desktop/blob/main/internal/media/media.go"
click node_asrmodels "https://github.com/rbbobby/audio-text-manager-desktop/blob/main/internal/asr/models.go"
click node_transcription "https://github.com/rbbobby/audio-text-manager-desktop/blob/main/internal/asr/whisper.go"
click node_segments "https://github.com/rbbobby/audio-text-manager-desktop/blob/main/internal/asr/segments.go"
click node_diarization "https://github.com/rbbobby/audio-text-manager-desktop/blob/main/internal/asr/diarize.go"
click node_flavor "https://github.com/rbbobby/audio-text-manager-desktop/blob/main/internal/flavor/flavor.go"
click node_summary "https://github.com/rbbobby/audio-text-manager-desktop/blob/main/internal/summary/ollama.go"
click node_llmmodel "https://github.com/rbbobby/audio-text-manager-desktop/blob/main/internal/llm/model.go"
click node_llmserver "https://github.com/rbbobby/audio-text-manager-desktop/blob/main/internal/llm/server.go"
click node_sidecar "https://github.com/rbbobby/audio-text-manager-desktop/blob/main/internal/sidecar/sidecar.go"
click node_download "https://github.com/rbbobby/audio-text-manager-desktop/blob/main/internal/download/download.go"
click node_datafolder "https://github.com/rbbobby/audio-text-manager-desktop/blob/main/internal/appdir/appdir.go"

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_frontend,node_app,node_settings,node_user toneBlue
class node_worker,node_jobs,node_media,node_datafolder toneAmber
class node_asrmodels,node_transcription,node_segments,node_diarization,node_flavor toneMint
class node_summary,node_llmmodel,node_llmserver,node_sidecar,node_download toneRose
```

## Components

### Desktop interface

- [Desktop UI](https://github.com/rbbobby/audio-text-manager-desktop/blob/main/frontend/dist/app.js): `frontend/dist/app.js`
- [Wails app API](https://github.com/rbbobby/audio-text-manager-desktop/blob/main/app.go): `app.go`
- [Settings](https://github.com/rbbobby/audio-text-manager-desktop/blob/main/internal/config/config.go): `internal/config/config.go`

### Job workflow

- [Job worker](https://github.com/rbbobby/audio-text-manager-desktop/blob/main/internal/pipeline/pipeline.go): `internal/pipeline/pipeline.go`
- [Job history](https://github.com/rbbobby/audio-text-manager-desktop/blob/main/internal/jobs/store.go): `internal/jobs/store.go`
- [Audio preparation](https://github.com/rbbobby/audio-text-manager-desktop/blob/main/internal/media/media.go): `internal/media/media.go`
- [App data location](https://github.com/rbbobby/audio-text-manager-desktop/blob/main/internal/appdir/appdir.go): `internal/appdir/appdir.go`

### Speech processing

- [ASR models](https://github.com/rbbobby/audio-text-manager-desktop/blob/main/internal/asr/models.go): `internal/asr/models.go`
- [Whisper transcription](https://github.com/rbbobby/audio-text-manager-desktop/blob/main/internal/asr/whisper.go): `internal/asr/whisper.go`
- [Transcript segments](https://github.com/rbbobby/audio-text-manager-desktop/blob/main/internal/asr/segments.go): `internal/asr/segments.go`
- [Speaker labeling](https://github.com/rbbobby/audio-text-manager-desktop/blob/main/internal/asr/diarize.go): `internal/asr/diarize.go`
- [Build flavor options](https://github.com/rbbobby/audio-text-manager-desktop/blob/main/internal/flavor/flavor.go): `internal/flavor/flavor.go`

### Local runtime

- [Summary generation](https://github.com/rbbobby/audio-text-manager-desktop/blob/main/internal/summary/ollama.go): `internal/summary/ollama.go`
- [Summary model](https://github.com/rbbobby/audio-text-manager-desktop/blob/main/internal/llm/model.go): `internal/llm/model.go`
- [llama.cpp server](https://github.com/rbbobby/audio-text-manager-desktop/blob/main/internal/llm/server.go): `internal/llm/server.go`
- [Runtime discovery](https://github.com/rbbobby/audio-text-manager-desktop/blob/main/internal/sidecar/sidecar.go): `internal/sidecar/sidecar.go`
- [Model downloads](https://github.com/rbbobby/audio-text-manager-desktop/blob/main/internal/download/download.go): `internal/download/download.go`

### Other components

- **Desktop user**

## Connections

- Desktop user → Desktop UI: uses (evidence: `README.md`)
- Desktop UI → Wails app API: invokes (evidence: `README.md`)
- Wails app API → Job worker: starts (evidence: `app.go`)
- Wails app API → Job history: manages jobs (evidence: `app.go`)
- Wails app API → Audio preparation: prepares uploads (evidence: `app.go`)
- Wails app API → Settings: loads settings (evidence: `app.go`)
- Wails app API → App data location: initializes data (evidence: `app.go`)
- Job worker → Job history: claims and updates (evidence: `internal/pipeline/pipeline.go`)
- Job worker → Settings: reads snapshot (evidence: `internal/pipeline/pipeline.go`)
- Job worker → ASR models: ensures weights (evidence: `internal/pipeline/pipeline.go`)
- Job worker → Whisper transcription: transcribes audio (evidence: `internal/pipeline/pipeline.go`)
- Whisper transcription → Transcript segments: parses output (evidence: `internal/asr/whisper.go`)
- Whisper transcription → Speaker labeling: assigns speakers (evidence: `internal/asr/whisper.go`)
- Job worker → Build flavor options: selects diarization (evidence: `internal/pipeline/pipeline.go`)
- Job worker → Summary model: ensures model (evidence: `internal/pipeline/pipeline.go`)
- Job worker → llama.cpp server: starts server (evidence: `internal/pipeline/pipeline.go`)
- Job worker → Summary generation: requests summary (evidence: `internal/pipeline/pipeline.go`)
- llama.cpp server → Runtime discovery: prepares process (evidence: `internal/llm/server.go`)
- Summary model → Runtime discovery: searches bundled model (evidence: `internal/llm/model.go`)
- Summary model → Model downloads: downloads missing model (evidence: `internal/llm/model.go`)
- ASR models → Build flavor options: checks preset (evidence: `internal/asr/models.go`)
- ASR models → Runtime discovery: searches bundled weights (evidence: `internal/asr/models.go`)
- ASR models → Model downloads: downloads missing weights (evidence: `internal/asr/models.go`)
- Audio preparation → Runtime discovery: resolves tools (evidence: `internal/media/media.go`)
- Job history → App data location: stores SQLite data
