# yawpoku/biblecue architecture

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

- Interactive diagram: https://gitdiagram.com/yawpoku/biblecue
- Repository: https://github.com/yawpoku/biblecue

## Overview

BibleCue listens to sermon audio, transcribes speech, recognizes scripture references, retrieves verse text, and sends it to a selected presentation target. The desktop renderer configures listening and outputs; Electron starts the Python backend, while the renderer communicates with it over WebSocket. The README documents both transcription modes and the supported output types. The excerpts show parsing entry points and output-plugin dispatch, but do not expose the full backend processing path, so that connection is marked unverified.

Main entry points: [`output_plugins.py`](https://github.com/yawpoku/biblecue/blob/main/output_plugins.py) (Output dispatcher), [`biblecue.py`](https://github.com/yawpoku/biblecue/blob/main/biblecue.py) (Python backend), [`biblecue-desktop/renderer/app.js`](https://github.com/yawpoku/biblecue/blob/main/biblecue-desktop/renderer/app.js) (Control UI), [`biblecue-desktop/main.js`](https://github.com/yawpoku/biblecue/blob/main/biblecue-desktop/main.js) (Electron host)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop app"]
  node_renderer["Control UI<br/>[app.js]"]
  node_electron["Electron host<br/>[main.js]"]
end

subgraph group_recognition["Speech and scripture"]
  node_backend["Python backend<br/>[biblecue.py]"]
  node_google["Google Speech<br/>[biblecue.py]"]
  node_deepgram["Deepgram listener<br/>[biblecue.py]"]
  node_reference_parser["Reference parser<br/>[biblecue.py]"]
end

subgraph group_verses["Verse content"]
  node_verse_lookup["Verse lookup<br/>[biblecue.py]"]
  node_local_bible[("Cached Bible text<br/>[biblecue.py]")]
end

subgraph group_delivery["Verse outputs"]
  node_output_dispatch["Output dispatcher<br/>[output_plugins.py]"]
  node_propresenter["ProPresenter"]
  node_obs["OBS Studio"]
  node_webhook["HTTP webhook"]
  node_text_file["Text file"]
  node_clipboard["Clipboard"]
  node_tcp["TCP target"]
  node_ndi["NDI stream"]
end

node_preacher(("Preacher"))

node_preacher -->|"speaks to"| node_google
node_preacher -->|"speaks to"| node_deepgram
node_renderer -->|"controls by WebSocket"| node_backend
node_electron -->|"starts"| node_backend
node_google -.->|"transcribes for"| node_reference_parser
node_deepgram -.->|"transcribes for"| node_reference_parser
node_backend -->|"parses manual verses"| node_reference_parser
node_reference_parser -.->|"resolves references"| node_verse_lookup
node_verse_lookup -.->|"reads verse text"| node_local_bible
node_backend -.->|"sends detected verses"| node_output_dispatch
node_output_dispatch -->|"triggers message"| node_propresenter
node_output_dispatch -->|"updates text source"| node_obs
node_output_dispatch -->|"posts JSON"| node_webhook
node_output_dispatch -->|"writes verse"| node_text_file
node_output_dispatch -->|"copies verse"| node_clipboard
node_output_dispatch -->|"sends text"| node_tcp
node_output_dispatch -->|"broadcasts stream"| node_ndi

click node_renderer "https://github.com/yawpoku/biblecue/blob/main/biblecue-desktop/renderer/app.js"
click node_electron "https://github.com/yawpoku/biblecue/blob/main/biblecue-desktop/main.js"
click node_backend "https://github.com/yawpoku/biblecue/blob/main/biblecue.py"
click node_google "https://github.com/yawpoku/biblecue/blob/main/biblecue.py"
click node_deepgram "https://github.com/yawpoku/biblecue/blob/main/biblecue.py"
click node_reference_parser "https://github.com/yawpoku/biblecue/blob/main/biblecue.py"
click node_verse_lookup "https://github.com/yawpoku/biblecue/blob/main/biblecue.py"
click node_local_bible "https://github.com/yawpoku/biblecue/blob/main/biblecue.py"
click node_output_dispatch "https://github.com/yawpoku/biblecue/blob/main/output_plugins.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_renderer,node_electron toneBlue
class node_backend,node_google,node_deepgram,node_reference_parser toneAmber
class node_verse_lookup,node_local_bible toneMint
class node_output_dispatch,node_propresenter,node_obs,node_webhook,node_text_file,node_clipboard,node_tcp,node_ndi toneRose
class node_preacher toneIndigo
```

## Components

### Desktop app

- [Control UI](https://github.com/yawpoku/biblecue/blob/main/biblecue-desktop/renderer/app.js): `biblecue-desktop/renderer/app.js`
- [Electron host](https://github.com/yawpoku/biblecue/blob/main/biblecue-desktop/main.js): `biblecue-desktop/main.js`

### Speech and scripture

- [Python backend](https://github.com/yawpoku/biblecue/blob/main/biblecue.py): `biblecue.py`
- [Google Speech](https://github.com/yawpoku/biblecue/blob/main/biblecue.py): `biblecue.py`
- [Deepgram listener](https://github.com/yawpoku/biblecue/blob/main/biblecue.py): `biblecue.py`
- [Reference parser](https://github.com/yawpoku/biblecue/blob/main/biblecue.py): `biblecue.py`

### Verse content

- [Verse lookup](https://github.com/yawpoku/biblecue/blob/main/biblecue.py): `biblecue.py`
- [Cached Bible text](https://github.com/yawpoku/biblecue/blob/main/biblecue.py): `biblecue.py`

### Verse outputs

- [Output dispatcher](https://github.com/yawpoku/biblecue/blob/main/output_plugins.py): `output_plugins.py`
- **ProPresenter**
- **OBS Studio**
- **HTTP webhook**
- **Text file**
- **Clipboard**
- **TCP target**
- **NDI stream**

### Other components

- **Preacher**

## Connections

- Preacher → Google Speech: speaks to (evidence: `README.md`)
- Preacher → Deepgram listener: speaks to (evidence: `README.md`)
- Control UI → Python backend: controls by WebSocket (evidence: `biblecue-desktop/renderer/app.js`)
- Electron host → Python backend: starts (evidence: `biblecue-desktop/main.js`)
- Google Speech → Reference parser: transcribes for (evidence: `biblecue.py`)
- Deepgram listener → Reference parser: transcribes for (evidence: `biblecue.py`)
- Python backend → Reference parser: parses manual verses (evidence: `biblecue.py`)
- Reference parser → Verse lookup: resolves references (evidence: `biblecue.py`)
- Verse lookup → Cached Bible text: reads verse text (evidence: `biblecue.py`)
- Python backend → Output dispatcher: sends detected verses (evidence: `biblecue.py`)
- Output dispatcher → ProPresenter: triggers message (evidence: `README.md`)
- Output dispatcher → OBS Studio: updates text source (evidence: `README.md`)
- Output dispatcher → HTTP webhook: posts JSON (evidence: `output_plugins.py`)
- Output dispatcher → Text file: writes verse (evidence: `output_plugins.py`)
- Output dispatcher → Clipboard: copies verse (evidence: `output_plugins.py`)
- Output dispatcher → TCP target: sends text (evidence: `README.md`)
- Output dispatcher → NDI stream: broadcasts stream (evidence: `output_plugins.py`)
