# tuncaen/yakamoz architecture

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

- Interactive diagram: https://gitdiagram.com/tuncaen/yakamoz
- Repository: https://github.com/tuncaen/yakamoz

## Overview

This is a command-line tool for producing vertical, captioned alumni interview videos. Its principal workflow transcribes a source video into word-timed subtitles, allows a person to correct the text and define cuts, applies the edit list and remaps subtitle timing, styles captions, then combines the clip with a faculty emblem and opening/closing cards. The README also documents an automated legacy route and subtitle-only embedding. The graph follows documented workflow and indexed imports; unsampled implementation details are not inferred.

Main entry points: [`src/run.py`](https://github.com/tuncaen/yakamoz/blob/master/src/run.py) (CLI orchestrator), [`src/compose.py`](https://github.com/tuncaen/yakamoz/blob/master/src/compose.py) (Final composition), [`src/cut.py`](https://github.com/tuncaen/yakamoz/blob/master/src/cut.py) (Cut and remap), [`src/srt2ass.py`](https://github.com/tuncaen/yakamoz/blob/master/src/srt2ass.py) (ASS and karaoke styling)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Workflow control"]
  node_run["CLI orchestrator<br/>[run.py]"]
  node_human_edit["Text and cut decisions"]
end

subgraph group_captions["Speech and captions"]
  node_transcribe["Word transcription<br/>[transcribe.py]"]
  node_word_srt["Word-timed SRT"]
  node_repack["Subtitle repacking<br/>[repack.py]"]
  node_packed_srt["Packed SRT"]
  node_style["ASS and karaoke styling<br/>[srt2ass.py]"]
  node_ass["Styled ASS"]
end

subgraph group_editing["Video editing"]
  node_edit_list["Edit list &#40;EDL&#41;"]
  node_cut["Cut and remap<br/>[cut.py]"]
  node_cut_video["Cut video"]
end

subgraph group_rendering["Cards and render"]
  node_compose["Final composition<br/>[compose.py]"]
  node_card["Graduate cards<br/>[card.py]"]
  node_final_video["Final vertical video"]
  node_legacy_embed["Subtitle-only embed<br/>[run.py]"]
end

subgraph group_shared["Shared utilities"]
  node_common["Paths and SRT helpers<br/>[common.py]"]
end

node_editor(("Operator / editor"))
node_source_video["Source video"]
node_whisper_service{{"faster-whisper"}}
node_ffmpeg_service{{"FFmpeg"}}

node_editor -->|"runs stages"| node_run
node_source_video -->|"selects input"| node_run
node_run -->|"dispatches"| node_transcribe
node_transcribe -->|"transcribes with"| node_whisper_service
node_transcribe -->|"writes word cues"| node_word_srt
node_editor -->|"corrects and edits"| node_human_edit
node_word_srt -->|"provides timings"| node_human_edit
node_human_edit -->|"creates"| node_edit_list
node_run -->|"dispatches"| node_cut
node_edit_list -->|"defines removals"| node_cut
node_cut -->|"cuts video"| node_ffmpeg_service
node_cut -->|"writes"| node_cut_video
node_cut -->|"remaps timings"| node_word_srt
node_run -->|"dispatches"| node_repack
node_repack -->|"builds captions"| node_packed_srt
node_run -->|"dispatches"| node_style
node_packed_srt -->|"styles cues"| node_style
node_word_srt -->|"aligns karaoke"| node_style
node_style -->|"writes ASS"| node_ass
node_run -->|"dispatches"| node_compose
node_ass -->|"burns captions"| node_compose
node_cut_video -->|"supplies edited clip"| node_compose
node_compose -->|"uses card assets"| node_card
node_compose -->|"renders with"| node_ffmpeg_service
node_compose -->|"writes final"| node_final_video
node_run -->|"dispatches legacy"| node_legacy_embed
node_legacy_embed -->|"embeds subtitles"| node_ffmpeg_service
node_run -->|"uses path helpers"| node_common

click node_run "https://github.com/tuncaen/yakamoz/blob/master/src/run.py"
click node_transcribe "https://github.com/tuncaen/yakamoz/blob/master/src/transcribe.py"
click node_cut "https://github.com/tuncaen/yakamoz/blob/master/src/cut.py"
click node_repack "https://github.com/tuncaen/yakamoz/blob/master/src/repack.py"
click node_style "https://github.com/tuncaen/yakamoz/blob/master/src/srt2ass.py"
click node_compose "https://github.com/tuncaen/yakamoz/blob/master/src/compose.py"
click node_card "https://github.com/tuncaen/yakamoz/blob/master/src/card.py"
click node_legacy_embed "https://github.com/tuncaen/yakamoz/blob/master/src/run.py"
click node_common "https://github.com/tuncaen/yakamoz/blob/master/src/common.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_run,node_human_edit toneBlue
class node_transcribe,node_word_srt,node_repack,node_packed_srt,node_style,node_ass toneAmber
class node_edit_list,node_cut,node_cut_video toneMint
class node_compose,node_card,node_final_video,node_legacy_embed toneRose
class node_common,node_editor,node_source_video,node_whisper_service,node_ffmpeg_service toneIndigo
```

## Components

### Workflow control

- [CLI orchestrator](https://github.com/tuncaen/yakamoz/blob/master/src/run.py): `src/run.py`
- **Text and cut decisions**

### Speech and captions

- [Word transcription](https://github.com/tuncaen/yakamoz/blob/master/src/transcribe.py): `src/transcribe.py`
- **Word-timed SRT**
- [Subtitle repacking](https://github.com/tuncaen/yakamoz/blob/master/src/repack.py): `src/repack.py`
- **Packed SRT**
- [ASS and karaoke styling](https://github.com/tuncaen/yakamoz/blob/master/src/srt2ass.py): `src/srt2ass.py`
- **Styled ASS**

### Video editing

- **Edit list (EDL)**
- [Cut and remap](https://github.com/tuncaen/yakamoz/blob/master/src/cut.py): `src/cut.py`
- **Cut video**

### Cards and render

- [Final composition](https://github.com/tuncaen/yakamoz/blob/master/src/compose.py): `src/compose.py`
- [Graduate cards](https://github.com/tuncaen/yakamoz/blob/master/src/card.py): `src/card.py`
- **Final vertical video**
- [Subtitle-only embed](https://github.com/tuncaen/yakamoz/blob/master/src/run.py): `src/run.py`

### Shared utilities

- [Paths and SRT helpers](https://github.com/tuncaen/yakamoz/blob/master/src/common.py): `src/common.py`

### Other components

- **Operator / editor**
- **Source video**
- **faster-whisper**
- **FFmpeg**

## Connections

- Operator / editor → CLI orchestrator: runs stages (evidence: `README.md`)
- Source video → CLI orchestrator: selects input (evidence: `README.md`)
- CLI orchestrator → Word transcription: dispatches (evidence: `src/run.py`)
- Word transcription → faster-whisper: transcribes with (evidence: `src/transcribe.py`)
- Word transcription → Word-timed SRT: writes word cues (evidence: `src/transcribe.py`)
- Operator / editor → Text and cut decisions: corrects and edits (evidence: `README.md`)
- Word-timed SRT → Text and cut decisions: provides timings (evidence: `README.md`)
- Text and cut decisions → Edit list (EDL): creates (evidence: `README.md`)
- CLI orchestrator → Cut and remap: dispatches (evidence: `src/run.py`)
- Edit list (EDL) → Cut and remap: defines removals (evidence: `README.md`)
- Cut and remap → FFmpeg: cuts video (evidence: `src/cut.py`)
- Cut and remap → Cut video: writes (evidence: `src/cut.py`)
- Cut and remap → Word-timed SRT: remaps timings (evidence: `src/cut.py`)
- CLI orchestrator → Subtitle repacking: dispatches (evidence: `src/run.py`)
- Subtitle repacking → Packed SRT: builds captions (evidence: `src/repack.py`)
- CLI orchestrator → ASS and karaoke styling: dispatches (evidence: `src/run.py`)
- Packed SRT → ASS and karaoke styling: styles cues (evidence: `src/srt2ass.py`)
- Word-timed SRT → ASS and karaoke styling: aligns karaoke (evidence: `README.md`)
- ASS and karaoke styling → Styled ASS: writes ASS (evidence: `src/srt2ass.py`)
- CLI orchestrator → Final composition: dispatches (evidence: `src/run.py`)
- Styled ASS → Final composition: burns captions (evidence: `README.md`)
- Cut video → Final composition: supplies edited clip (evidence: `README.md`)
- Final composition → Graduate cards: uses card assets (evidence: `src/compose.py`)
- Final composition → FFmpeg: renders with (evidence: `src/compose.py`)
- Final composition → Final vertical video: writes final (evidence: `README.md`)
- CLI orchestrator → Subtitle-only embed: dispatches legacy (evidence: `src/run.py`)
- Subtitle-only embed → FFmpeg: embeds subtitles (evidence: `src/run.py`)
- CLI orchestrator → Paths and SRT helpers: uses path helpers (evidence: `src/run.py`)
