# coding-parsa/parley architecture

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

- Interactive diagram: https://gitdiagram.com/coding-parsa/parley
- Repository: https://github.com/coding-parsa/parley

## Overview

Parley is an offline live-interpretation application. Users choose a language pair and profile, then run live, file, caption-console, or bidirectional meeting interpretation: audio is segmented into utterances, recognized and language-gated, translated, optionally shaped with glossary terminology, and spoken or shown as captions. The sampled pipeline and duplex excerpts establish orchestration and shared model/resource behavior; several model-stage links below are documented by the README rather than fully visible in source excerpts.

Main entry points: [`parley/pipeline.py`](https://github.com/coding-parsa/parley/blob/main/parley/pipeline.py) (Interpreter pipeline), [`parley/duplex.py`](https://github.com/coding-parsa/parley/blob/main/parley/duplex.py) (Duplex coordinator), [`parley/gui.py`](https://github.com/coding-parsa/parley/blob/main/parley/gui.py) (Desktop app), [`parley/audio.py`](https://github.com/coding-parsa/parley/blob/main/parley/audio.py) (Audio playback)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interfaces["User interfaces"]
  node_cli["CLI commands<br/>[cli.py]"]
  node_desktop["Desktop app<br/>[gui.py]"]
  node_webconsole["Caption console<br/>[server.py]"]
end

subgraph group_audio["Audio and orchestration"]
  node_capture["Audio capture<br/>[audio.py]"]
  node_segmenter["VAD segmenter<br/>[vad.py]"]
  node_interpreter["Interpreter pipeline<br/>[pipeline.py]"]
  node_duplex["Duplex coordinator<br/>[duplex.py]"]
  node_speaker["Audio playback<br/>[audio.py]"]
end

subgraph group_language["Language processing"]
  node_stt["Whisper recognition<br/>[stt.py]"]
  node_text["Text and glossary<br/>[text.py]"]
  node_mt["NLLB translation<br/>[mt.py]"]
  node_tts["Piper synthesis<br/>[tts.py]"]
end

subgraph group_resources["Models and resources"]
  node_config["Language profiles<br/>[config.py]"]
  node_budget["VRAM manager<br/>[vram.py]"]
  node_fetch["Model fetching<br/>[fetch.py]"]
end

node_user(("User"))
node_meeting(("Meeting apps"))

node_user -->|"runs commands"| node_cli
node_user -->|"starts app"| node_desktop
node_user -->|"opens console"| node_webconsole
node_cli -->|"runs modes"| node_interpreter
node_cli -->|"starts meeting"| node_duplex
node_desktop -->|"starts translation"| node_interpreter
node_desktop -->|"requests downloads"| node_fetch
node_webconsole -->|"starts pipeline"| node_interpreter
node_capture -->|"streams frames"| node_segmenter
node_segmenter -->|"yields utterances"| node_interpreter
node_interpreter -->|"recognizes speech"| node_stt
node_interpreter -->|"translates text"| node_mt
node_interpreter -->|"shapes text"| node_text
node_interpreter -->|"synthesizes speech"| node_tts
node_tts -->|"produces audio"| node_speaker
node_interpreter -->|"plays audio"| node_speaker
node_meeting -->|"loopback audio"| node_capture
node_speaker -->|"feeds virtual cable"| node_meeting
node_duplex -->|"runs both directions"| node_interpreter
node_duplex -->|"captures directions"| node_capture
node_duplex -->|"routes translated audio"| node_speaker
node_interpreter -->|"uses pair and profile"| node_config
node_interpreter -->|"admits models"| node_budget
node_duplex -->|"shares model budget"| node_budget
node_desktop -->|"builds settings"| node_config

click node_cli "https://github.com/coding-parsa/parley/blob/main/parley/cli.py"
click node_desktop "https://github.com/coding-parsa/parley/blob/main/parley/gui.py"
click node_webconsole "https://github.com/coding-parsa/parley/blob/main/parley/server.py"
click node_capture "https://github.com/coding-parsa/parley/blob/main/parley/audio.py"
click node_segmenter "https://github.com/coding-parsa/parley/blob/main/parley/vad.py"
click node_interpreter "https://github.com/coding-parsa/parley/blob/main/parley/pipeline.py"
click node_duplex "https://github.com/coding-parsa/parley/blob/main/parley/duplex.py"
click node_speaker "https://github.com/coding-parsa/parley/blob/main/parley/audio.py"
click node_stt "https://github.com/coding-parsa/parley/blob/main/parley/stt.py"
click node_text "https://github.com/coding-parsa/parley/blob/main/parley/text.py"
click node_mt "https://github.com/coding-parsa/parley/blob/main/parley/mt.py"
click node_tts "https://github.com/coding-parsa/parley/blob/main/parley/tts.py"
click node_config "https://github.com/coding-parsa/parley/blob/main/parley/config.py"
click node_budget "https://github.com/coding-parsa/parley/blob/main/parley/vram.py"
click node_fetch "https://github.com/coding-parsa/parley/blob/main/parley/fetch.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_cli,node_desktop,node_webconsole,node_user toneBlue
class node_capture,node_segmenter,node_interpreter,node_duplex,node_speaker toneAmber
class node_stt,node_text,node_mt,node_tts toneMint
class node_config,node_budget,node_fetch toneRose
class node_meeting toneIndigo
```

## Components

### User interfaces

- [CLI commands](https://github.com/coding-parsa/parley/blob/main/parley/cli.py): `parley/cli.py`
- [Desktop app](https://github.com/coding-parsa/parley/blob/main/parley/gui.py): `parley/gui.py`
- [Caption console](https://github.com/coding-parsa/parley/blob/main/parley/server.py): `parley/server.py`

### Audio and orchestration

- [Audio capture](https://github.com/coding-parsa/parley/blob/main/parley/audio.py): `parley/audio.py`
- [VAD segmenter](https://github.com/coding-parsa/parley/blob/main/parley/vad.py): `parley/vad.py`
- [Interpreter pipeline](https://github.com/coding-parsa/parley/blob/main/parley/pipeline.py): `parley/pipeline.py`
- [Duplex coordinator](https://github.com/coding-parsa/parley/blob/main/parley/duplex.py): `parley/duplex.py`
- [Audio playback](https://github.com/coding-parsa/parley/blob/main/parley/audio.py): `parley/audio.py`

### Language processing

- [Whisper recognition](https://github.com/coding-parsa/parley/blob/main/parley/stt.py): `parley/stt.py`
- [Text and glossary](https://github.com/coding-parsa/parley/blob/main/parley/text.py): `parley/text.py`
- [NLLB translation](https://github.com/coding-parsa/parley/blob/main/parley/mt.py): `parley/mt.py`
- [Piper synthesis](https://github.com/coding-parsa/parley/blob/main/parley/tts.py): `parley/tts.py`

### Models and resources

- [Language profiles](https://github.com/coding-parsa/parley/blob/main/parley/config.py): `parley/config.py`
- [VRAM manager](https://github.com/coding-parsa/parley/blob/main/parley/vram.py): `parley/vram.py`
- [Model fetching](https://github.com/coding-parsa/parley/blob/main/parley/fetch.py): `parley/fetch.py`

### Other components

- **User**
- **Meeting apps**

## Connections

- User → CLI commands: runs commands (evidence: `README.md`)
- User → Desktop app: starts app (evidence: `README.md`)
- User → Caption console: opens console (evidence: `README.md`)
- CLI commands → Interpreter pipeline: runs modes (evidence: `parley/cli.py`)
- CLI commands → Duplex coordinator: starts meeting (evidence: `parley/cli.py`)
- Desktop app → Interpreter pipeline: starts translation (evidence: `parley/gui.py`)
- Desktop app → Model fetching: requests downloads (evidence: `parley/gui.py`)
- Caption console → Interpreter pipeline: starts pipeline (evidence: `parley/server.py`)
- Audio capture → VAD segmenter: streams frames (evidence: `README.md`)
- VAD segmenter → Interpreter pipeline: yields utterances (evidence: `parley/pipeline.py`)
- Interpreter pipeline → Whisper recognition: recognizes speech (evidence: `README.md`)
- Interpreter pipeline → NLLB translation: translates text (evidence: `README.md`)
- Interpreter pipeline → Text and glossary: shapes text (evidence: `parley/pipeline.py`)
- Interpreter pipeline → Piper synthesis: synthesizes speech (evidence: `README.md`)
- Piper synthesis → Audio playback: produces audio (evidence: `README.md`)
- Interpreter pipeline → Audio playback: plays audio (evidence: `parley/pipeline.py`)
- Meeting apps → Audio capture: loopback audio (evidence: `README.md`)
- Audio playback → Meeting apps: feeds virtual cable (evidence: `README.md`)
- Duplex coordinator → Interpreter pipeline: runs both directions (evidence: `parley/duplex.py`)
- Duplex coordinator → Audio capture: captures directions (evidence: `parley/duplex.py`)
- Duplex coordinator → Audio playback: routes translated audio (evidence: `README.md`)
- Interpreter pipeline → Language profiles: uses pair and profile (evidence: `parley/pipeline.py`)
- Interpreter pipeline → VRAM manager: admits models (evidence: `parley/pipeline.py`)
- Duplex coordinator → VRAM manager: shares model budget (evidence: `parley/duplex.py`)
- Desktop app → Language profiles: builds settings (evidence: `parley/gui.py`)
