# nagakiran777/ai-dub-studio architecture

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

- Interactive diagram: https://gitdiagram.com/nagakiran777/ai-dub-studio
- Repository: https://github.com/nagakiran777/ai-dub-studio

## Overview

AI Dub Studio turns an input video into a dubbed video through vocal separation, transcription, speaker diarization, emotion detection, translation, voice-cloned synthesis, and assembly. Its browser-based frontend supports job and pipeline control, dialogue and speaker review, translation editing, and video playback. The README documents the stage order; sampled frontend code shows API-backed state and editing, while the source index confirms the shared speed helper is referenced by the server and assembly stage. Most backend and pipeline internals were not excerpted, so those relationships are based on README documentation.

Main entry points: [`stages/06_frontend/frontend/src/App.jsx`](https://github.com/nagakiran777/ai-dub-studio/blob/main/stages/06_frontend/frontend/src/App.jsx) (Studio interface), [`stages/06_frontend/frontend/src/store.js`](https://github.com/nagakiran777/ai-dub-studio/blob/main/stages/06_frontend/frontend/src/store.js) (Frontend state), [`stages/06_frontend/server.py`](https://github.com/nagakiran777/ai-dub-studio/blob/main/stages/06_frontend/server.py) (Job API server), [`stages/06_frontend/frontend/src/components/PipelinePanel.jsx`](https://github.com/nagakiran777/ai-dub-studio/blob/main/stages/06_frontend/frontend/src/components/PipelinePanel.jsx) (Pipeline controls)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_processing["Dubbing stages"]
  node_pipeline["Pipeline orchestrator<br/>[pipeline.py]"]
  node_vocals["Vocal extraction<br/>[run.py]"]
  node_asr["Speech recognition<br/>[run.py]"]
  node_diarization["Speaker diarization<br/>[run.py]"]
  node_emotion["Emotion detection<br/>[run.py]"]
  node_translation["Translation<br/>[run.py]"]
  node_tts["Voice synthesis<br/>[run.py]"]
  node_assembly["Video assembly<br/>[run.py]"]
  node_speed["Dub speed matching<br/>[dub_speed.py]"]
end

subgraph group_interface["Studio interface"]
  node_frontend["Studio interface<br/>[App.jsx]"]
  node_pipelineui["Pipeline controls<br/>[PipelinePanel.jsx]"]
  node_dialogue["Dialogue editor<br/>[DialogueEditor.jsx]"]
  node_timeline["Dialogue timeline<br/>[Timeline.jsx]"]
  node_speakerui["Speaker panel<br/>[SpeakerPanel.jsx]"]
  node_video_ui["Video player<br/>[VideoPlayer.jsx]"]
  node_translationui["Translation panel"]
  node_store["Frontend state<br/>[store.js]"]
end

subgraph group_backend["Job backend"]
  node_server["Job API server<br/>[server.py]"]
end

node_editor(("Studio user"))
node_video["Input video"]

node_editor -->|"selects"| node_video
node_video -->|"submits"| node_pipeline
node_pipeline -->|"runs first"| node_vocals
node_vocals -->|"then runs"| node_asr
node_asr -->|"then runs"| node_diarization
node_diarization -->|"then runs"| node_emotion
node_emotion -->|"then runs"| node_translation
node_translation -->|"then runs"| node_tts
node_tts -->|"then runs"| node_assembly
node_assembly -->|"uses"| node_speed
node_server -->|"uses"| node_speed
node_editor -->|"reviews output"| node_frontend
node_frontend -->|"renders"| node_pipelineui
node_frontend -->|"renders"| node_dialogue
node_frontend -->|"renders"| node_timeline
node_frontend -->|"renders"| node_speakerui
node_frontend -->|"renders"| node_video_ui
node_frontend -->|"renders"| node_translationui
node_pipelineui -->|"reads state"| node_store
node_dialogue -->|"updates state"| node_store
node_timeline -->|"updates state"| node_store
node_store -->|"calls API"| node_server
node_dialogue -->|"edits dialogue"| node_server
node_pipelineui -->|"controls pipeline"| node_server

click node_pipeline "https://github.com/nagakiran777/ai-dub-studio/blob/main/pipeline.py"
click node_vocals "https://github.com/nagakiran777/ai-dub-studio/blob/main/stages/00_vocals/run.py"
click node_asr "https://github.com/nagakiran777/ai-dub-studio/blob/main/stages/01_asr/run.py"
click node_diarization "https://github.com/nagakiran777/ai-dub-studio/blob/main/stages/01b_diarization/run.py"
click node_emotion "https://github.com/nagakiran777/ai-dub-studio/blob/main/stages/02_emotion/run.py"
click node_translation "https://github.com/nagakiran777/ai-dub-studio/blob/main/stages/03_translation/run.py"
click node_tts "https://github.com/nagakiran777/ai-dub-studio/blob/main/stages/04_tts/run.py"
click node_assembly "https://github.com/nagakiran777/ai-dub-studio/blob/main/stages/05_assembly/run.py"
click node_speed "https://github.com/nagakiran777/ai-dub-studio/blob/main/stages/_shared/dub_speed.py"
click node_frontend "https://github.com/nagakiran777/ai-dub-studio/blob/main/stages/06_frontend/frontend/src/App.jsx"
click node_pipelineui "https://github.com/nagakiran777/ai-dub-studio/blob/main/stages/06_frontend/frontend/src/components/PipelinePanel.jsx"
click node_dialogue "https://github.com/nagakiran777/ai-dub-studio/blob/main/stages/06_frontend/frontend/src/components/DialogueEditor.jsx"
click node_timeline "https://github.com/nagakiran777/ai-dub-studio/blob/main/stages/06_frontend/frontend/src/components/Timeline.jsx"
click node_speakerui "https://github.com/nagakiran777/ai-dub-studio/blob/main/stages/06_frontend/frontend/src/components/SpeakerPanel.jsx"
click node_video_ui "https://github.com/nagakiran777/ai-dub-studio/blob/main/stages/06_frontend/frontend/src/components/VideoPlayer.jsx"
click node_translationui "https://github.com/nagakiran777/ai-dub-studio/blob/main/stages/06_frontend/frontend/src/components/TranslationPanel.jsx"
click node_store "https://github.com/nagakiran777/ai-dub-studio/blob/main/stages/06_frontend/frontend/src/store.js"
click node_server "https://github.com/nagakiran777/ai-dub-studio/blob/main/stages/06_frontend/server.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_pipeline,node_vocals,node_asr,node_diarization,node_emotion,node_translation,node_tts,node_assembly,node_speed,node_editor toneBlue
class node_frontend,node_pipelineui,node_dialogue,node_timeline,node_speakerui,node_video_ui,node_translationui,node_store toneAmber
class node_server toneMint
class node_video toneIndigo
```

## Components

### Dubbing stages

- [Pipeline orchestrator](https://github.com/nagakiran777/ai-dub-studio/blob/main/pipeline.py): `pipeline.py`
- [Vocal extraction](https://github.com/nagakiran777/ai-dub-studio/blob/main/stages/00_vocals/run.py): `stages/00_vocals/run.py`
- [Speech recognition](https://github.com/nagakiran777/ai-dub-studio/blob/main/stages/01_asr/run.py): `stages/01_asr/run.py`
- [Speaker diarization](https://github.com/nagakiran777/ai-dub-studio/blob/main/stages/01b_diarization/run.py): `stages/01b_diarization/run.py`
- [Emotion detection](https://github.com/nagakiran777/ai-dub-studio/blob/main/stages/02_emotion/run.py): `stages/02_emotion/run.py`
- [Translation](https://github.com/nagakiran777/ai-dub-studio/blob/main/stages/03_translation/run.py): `stages/03_translation/run.py`
- [Voice synthesis](https://github.com/nagakiran777/ai-dub-studio/blob/main/stages/04_tts/run.py): `stages/04_tts/run.py`
- [Video assembly](https://github.com/nagakiran777/ai-dub-studio/blob/main/stages/05_assembly/run.py): `stages/05_assembly/run.py`
- [Dub speed matching](https://github.com/nagakiran777/ai-dub-studio/blob/main/stages/_shared/dub_speed.py): `stages/_shared/dub_speed.py`

### Studio interface

- [Studio interface](https://github.com/nagakiran777/ai-dub-studio/blob/main/stages/06_frontend/frontend/src/App.jsx): `stages/06_frontend/frontend/src/App.jsx`
- [Pipeline controls](https://github.com/nagakiran777/ai-dub-studio/blob/main/stages/06_frontend/frontend/src/components/PipelinePanel.jsx): `stages/06_frontend/frontend/src/components/PipelinePanel.jsx`
- [Dialogue editor](https://github.com/nagakiran777/ai-dub-studio/blob/main/stages/06_frontend/frontend/src/components/DialogueEditor.jsx): `stages/06_frontend/frontend/src/components/DialogueEditor.jsx`
- [Dialogue timeline](https://github.com/nagakiran777/ai-dub-studio/blob/main/stages/06_frontend/frontend/src/components/Timeline.jsx): `stages/06_frontend/frontend/src/components/Timeline.jsx`
- [Speaker panel](https://github.com/nagakiran777/ai-dub-studio/blob/main/stages/06_frontend/frontend/src/components/SpeakerPanel.jsx): `stages/06_frontend/frontend/src/components/SpeakerPanel.jsx`
- [Video player](https://github.com/nagakiran777/ai-dub-studio/blob/main/stages/06_frontend/frontend/src/components/VideoPlayer.jsx): `stages/06_frontend/frontend/src/components/VideoPlayer.jsx`
- [Translation panel](https://github.com/nagakiran777/ai-dub-studio/blob/main/stages/06_frontend/frontend/src/components/TranslationPanel.jsx): `stages/06_frontend/frontend/src/components/TranslationPanel.jsx`
- [Frontend state](https://github.com/nagakiran777/ai-dub-studio/blob/main/stages/06_frontend/frontend/src/store.js): `stages/06_frontend/frontend/src/store.js`

### Job backend

- [Job API server](https://github.com/nagakiran777/ai-dub-studio/blob/main/stages/06_frontend/server.py): `stages/06_frontend/server.py`

### Other components

- **Studio user**
- **Input video**

## Connections

- Studio user → Input video: selects (evidence: `README.md`)
- Input video → Pipeline orchestrator: submits (evidence: `README.md`)
- Pipeline orchestrator → Vocal extraction: runs first (evidence: `README.md`)
- Vocal extraction → Speech recognition: then runs (evidence: `README.md`)
- Speech recognition → Speaker diarization: then runs (evidence: `README.md`)
- Speaker diarization → Emotion detection: then runs (evidence: `README.md`)
- Emotion detection → Translation: then runs (evidence: `README.md`)
- Translation → Voice synthesis: then runs (evidence: `README.md`)
- Voice synthesis → Video assembly: then runs (evidence: `README.md`)
- Video assembly → Dub speed matching: uses (evidence: `stages/05_assembly/run.py`)
- Job API server → Dub speed matching: uses (evidence: `stages/06_frontend/server.py`)
- Studio user → Studio interface: reviews output (evidence: `README.md`)
- Studio interface → Pipeline controls: renders (evidence: `stages/06_frontend/frontend/src/App.jsx`)
- Studio interface → Dialogue editor: renders (evidence: `stages/06_frontend/frontend/src/App.jsx`)
- Studio interface → Dialogue timeline: renders (evidence: `stages/06_frontend/frontend/src/App.jsx`)
- Studio interface → Speaker panel: renders (evidence: `stages/06_frontend/frontend/src/App.jsx`)
- Studio interface → Video player: renders (evidence: `stages/06_frontend/frontend/src/App.jsx`)
- Studio interface → Translation panel: renders (evidence: `stages/06_frontend/frontend/src/App.jsx`)
- Pipeline controls → Frontend state: reads state (evidence: `stages/06_frontend/frontend/src/components/PipelinePanel.jsx`)
- Dialogue editor → Frontend state: updates state (evidence: `stages/06_frontend/frontend/src/components/DialogueEditor.jsx`)
- Dialogue timeline → Frontend state: updates state (evidence: `stages/06_frontend/frontend/src/components/Timeline.jsx`)
- Frontend state → Job API server: calls API (evidence: `stages/06_frontend/frontend/src/store.js`)
- Dialogue editor → Job API server: edits dialogue (evidence: `stages/06_frontend/frontend/src/components/DialogueEditor.jsx`)
- Pipeline controls → Job API server: controls pipeline (evidence: `stages/06_frontend/frontend/src/components/PipelinePanel.jsx`)
