# danielswolf/rhubarb-lip-sync architecture

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

- Interactive diagram: https://gitdiagram.com/danielswolf/rhubarb-lip-sync
- Repository: https://github.com/danielswolf/rhubarb-lip-sync

## Overview

Rhubarb Lip Sync is a command-line and GUI-assisted tool that turns recorded speech into mouth-cue animation data. The main workflow accepts audio and options, recognizes speech, generates timed mouth shapes, and exports the result; the README also documents editor integrations and multiple export formats. The main CLI excerpt and README establish the workflow, but most implementation files were not excerpted, so internal links beyond those references are omitted or marked unverified.

Main entry points: [`rhubarb/src/rhubarb/main.cpp`](https://github.com/danielswolf/rhubarb-lip-sync/blob/master/rhubarb/src/rhubarb/main.cpp) (Animator CLI), [`rhubarb/src/audio`](https://github.com/danielswolf/rhubarb-lip-sync/tree/master/rhubarb/src/audio) (Audio readers), [`rhubarb/src/recognition`](https://github.com/danielswolf/rhubarb-lip-sync/tree/master/rhubarb/src/recognition) (Speech recognizers), [`rhubarb/src/animation`](https://github.com/danielswolf/rhubarb-lip-sync/tree/master/rhubarb/src/animation) (Mouth animation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Lip-sync workflow"]
  node_animator["Animator CLI<br/>[main.cpp]"]
  node_audio["Audio readers"]
  node_recognizers["Speech recognizers"]
  node_animation["Mouth animation"]
  node_timing["Timed cues"]
end

subgraph group_formats["Export formats"]
  node_tsv["TSV exporter<br/>[TsvExporter.cpp]"]
  node_xml["XML exporter<br/>[XmlExporter.cpp]"]
  node_dat["DAT exporter<br/>[DatExporter.cpp]"]
end

subgraph group_integrations["Editor integrations"]
  node_aftereffects["After Effects script"]
  node_spine["Spine GUI"]
  node_vegas["Vegas scripts"]
end

node_user(("Animator"))
node_recording["Audio recording"]
node_output["Animation file"]

node_user -->|"runs"| node_animator
node_animator -.->|"loads audio"| node_audio
node_recording -->|"provides input"| node_audio
node_audio -->|"analyzes speech"| node_recognizers
node_recognizers -->|"recognizes dialog"| node_animation
node_animation -.->|"creates timed cues"| node_timing
node_animator -->|"selects format"| node_tsv
node_animator -->|"selects format"| node_xml
node_animator -->|"selects format"| node_dat
node_tsv -->|"writes cues"| node_output
node_xml -->|"writes cues"| node_output
node_dat -->|"writes switch data"| node_output
node_user -->|"uses integration"| node_aftereffects
node_user -->|"uses integration"| node_spine
node_user -->|"uses integration"| node_vegas
node_aftereffects -.->|"integrates with"| node_animator
node_spine -->|"imports results"| node_animator
node_vegas -.->|"integrates with"| node_animator

click node_animator "https://github.com/danielswolf/rhubarb-lip-sync/blob/master/rhubarb/src/rhubarb/main.cpp"
click node_audio "https://github.com/danielswolf/rhubarb-lip-sync/tree/master/rhubarb/src/audio"
click node_recognizers "https://github.com/danielswolf/rhubarb-lip-sync/tree/master/rhubarb/src/recognition"
click node_animation "https://github.com/danielswolf/rhubarb-lip-sync/tree/master/rhubarb/src/animation"
click node_timing "https://github.com/danielswolf/rhubarb-lip-sync/tree/master/rhubarb/src/time"
click node_tsv "https://github.com/danielswolf/rhubarb-lip-sync/blob/master/rhubarb/src/exporters/TsvExporter.cpp"
click node_xml "https://github.com/danielswolf/rhubarb-lip-sync/blob/master/rhubarb/src/exporters/XmlExporter.cpp"
click node_dat "https://github.com/danielswolf/rhubarb-lip-sync/blob/master/rhubarb/src/exporters/DatExporter.cpp"
click node_aftereffects "https://github.com/danielswolf/rhubarb-lip-sync/blob/master/extras/AdobeAfterEffects/Rhubarb%20Lip%20Sync.jsx"
click node_spine "https://github.com/danielswolf/rhubarb-lip-sync/tree/master/extras/EsotericSoftwareSpine/src/main/kotlin"
click node_vegas "https://github.com/danielswolf/rhubarb-lip-sync/tree/master/extras/MagixVegas"

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_animator,node_audio,node_recognizers,node_animation,node_timing toneBlue
class node_tsv,node_xml,node_dat toneAmber
class node_aftereffects,node_spine,node_vegas toneMint
class node_user,node_recording,node_output toneIndigo
```

## Components

### Lip-sync workflow

- [Animator CLI](https://github.com/danielswolf/rhubarb-lip-sync/blob/master/rhubarb/src/rhubarb/main.cpp): `rhubarb/src/rhubarb/main.cpp`
- [Audio readers](https://github.com/danielswolf/rhubarb-lip-sync/tree/master/rhubarb/src/audio): `rhubarb/src/audio`
- [Speech recognizers](https://github.com/danielswolf/rhubarb-lip-sync/tree/master/rhubarb/src/recognition): `rhubarb/src/recognition`
- [Mouth animation](https://github.com/danielswolf/rhubarb-lip-sync/tree/master/rhubarb/src/animation): `rhubarb/src/animation`
- [Timed cues](https://github.com/danielswolf/rhubarb-lip-sync/tree/master/rhubarb/src/time): `rhubarb/src/time`

### Export formats

- [TSV exporter](https://github.com/danielswolf/rhubarb-lip-sync/blob/master/rhubarb/src/exporters/TsvExporter.cpp): `rhubarb/src/exporters/TsvExporter.cpp`
- [XML exporter](https://github.com/danielswolf/rhubarb-lip-sync/blob/master/rhubarb/src/exporters/XmlExporter.cpp): `rhubarb/src/exporters/XmlExporter.cpp`
- [DAT exporter](https://github.com/danielswolf/rhubarb-lip-sync/blob/master/rhubarb/src/exporters/DatExporter.cpp): `rhubarb/src/exporters/DatExporter.cpp`

### Editor integrations

- [After Effects script](https://github.com/danielswolf/rhubarb-lip-sync/blob/master/extras/AdobeAfterEffects/Rhubarb%20Lip%20Sync.jsx): `extras/AdobeAfterEffects/Rhubarb Lip Sync.jsx`
- [Spine GUI](https://github.com/danielswolf/rhubarb-lip-sync/tree/master/extras/EsotericSoftwareSpine/src/main/kotlin): `extras/EsotericSoftwareSpine/src/main/kotlin`
- [Vegas scripts](https://github.com/danielswolf/rhubarb-lip-sync/tree/master/extras/MagixVegas): `extras/MagixVegas`

### Other components

- **Animator**
- **Audio recording**
- **Animation file**

## Connections

- Animator → Animator CLI: runs (evidence: `README.adoc`)
- Animator CLI → Audio readers: loads audio
- Audio recording → Audio readers: provides input (evidence: `README.adoc`)
- Audio readers → Speech recognizers: analyzes speech (evidence: `README.adoc`)
- Speech recognizers → Mouth animation: recognizes dialog (evidence: `README.adoc`)
- Mouth animation → Timed cues: creates timed cues (evidence: `rhubarb/src/animation/timingOptimization.cpp`)
- Animator CLI → TSV exporter: selects format (evidence: `rhubarb/src/rhubarb/main.cpp`)
- Animator CLI → XML exporter: selects format (evidence: `rhubarb/src/rhubarb/main.cpp`)
- Animator CLI → DAT exporter: selects format (evidence: `rhubarb/src/rhubarb/main.cpp`)
- TSV exporter → Animation file: writes cues (evidence: `README.adoc`)
- XML exporter → Animation file: writes cues (evidence: `README.adoc`)
- DAT exporter → Animation file: writes switch data (evidence: `README.adoc`)
- Animator → After Effects script: uses integration (evidence: `README.adoc`)
- Animator → Spine GUI: uses integration (evidence: `README.adoc`)
- Animator → Vegas scripts: uses integration (evidence: `README.adoc`)
- After Effects script → Animator CLI: integrates with
- Spine GUI → Animator CLI: imports results (evidence: `README.adoc`)
- Vegas scripts → Animator CLI: integrates with
