# n-sudy/recap-en-to-mm architecture

> Architecture diagram of the GitHub repository n-sudy/recap-en-to-mm, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/n-sudy/recap-en-to-mm
- Repository: https://github.com/n-sudy/recap-en-to-mm

## Overview

Recap → Myanmar is a Windows video-narration tool: users select a video and narration settings, then receive a Myanmar-voiced video whose picture follows the narration timing. Its distinct stages include local transcription, story-aware translation and segmentation, speech generation, synchronized rendering, and optional subtitle/overlay editing. A separate Splitter tab divides long videos with configurable cuts and presentation. The source excerpts show UI, planning, rendering, preview, and splitting code; several service connections and rendering details are supported only by README descriptions or the source index.

Main entry points: [`app/core.py`](https://github.com/n-sudy/recap-en-to-mm/blob/main/app/core.py) (Smart Sync renderer), [`app/recap_planner.py`](https://github.com/n-sudy/recap-en-to-mm/blob/main/app/recap_planner.py) (Story and timing plan), [`app/controller.py`](https://github.com/n-sudy/recap-en-to-mm/blob/main/app/controller.py) (Main controls), [`app/splitter.py`](https://github.com/n-sudy/recap-en-to-mm/blob/main/app/splitter.py) (Cut and encode)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_recap["Recap narration"]
  node_controller["Main controls<br/>[controller.py]"]
  node_transcription["Whisper transcription<br/>[whisper_service.py]"]
  node_ai["Gemini language service<br/>[ai_service.py]"]
  node_planner["Story and timing plan<br/>[recap_planner.py]"]
  node_tts["Narrator speech<br/>[gemini_tts.py]"]
  node_editor["Narration editor"]
end

subgraph group_render["Sync and presentation"]
  node_sync["Smart Sync renderer<br/>[core.py]"]
  node_subtitles["Subtitle cues<br/>[subtitle_png.py]"]
  node_subtitle_style["Subtitle fonts<br/>[subtitle_fonts.py]"]
  node_overlays["Text overlays"]
  node_preview["Frame preview<br/>[preview_tools.py]"]
end

subgraph group_split["Video splitting"]
  node_split_ui["Splitter controls<br/>[splitter_tab.py]"]
  node_split_engine["Cut and encode<br/>[splitter.py]"]
end

node_user(("Video creator"))
node_edge_tts["Edge TTS"]
node_gemini["Gemini API"]
node_video["Source video"]
node_final["Myanmar video"]
node_parts["Video parts"]

node_user -->|"selects and configures"| node_controller
node_controller -->|"starts planning"| node_planner
node_planner -->|"transcribes locally"| node_transcription
node_planner -->|"translates and audits"| node_ai
node_planner -.->|"generates narration"| node_tts
node_tts -.->|"requests speech"| node_gemini
node_planner -->|"requests translation"| node_gemini
node_controller -->|"starts rendering"| node_sync
node_sync -->|"reads video"| node_video
node_sync -->|"uses Myanmar voice"| node_edge_tts
node_sync -->|"renders synchronized output"| node_final
node_sync -->|"prepares subtitle track"| node_subtitles
node_subtitles -->|"uses font helpers"| node_subtitle_style
node_sync -->|"renders text overlays"| node_overlays
node_controller -->|"refreshes preview"| node_preview
node_controller -->|"opens text editor"| node_editor
node_editor -->|"updates narration plan"| node_planner
node_user -->|"chooses split settings"| node_split_ui
node_split_ui -->|"starts splitting"| node_split_engine
node_split_engine -->|"reads source"| node_video
node_split_engine -->|"encodes segments"| node_parts

click node_controller "https://github.com/n-sudy/recap-en-to-mm/blob/main/app/controller.py"
click node_transcription "https://github.com/n-sudy/recap-en-to-mm/blob/main/recap_runtime/services/whisper_service.py"
click node_ai "https://github.com/n-sudy/recap-en-to-mm/blob/main/recap_runtime/services/ai_service.py"
click node_planner "https://github.com/n-sudy/recap-en-to-mm/blob/main/app/recap_planner.py"
click node_tts "https://github.com/n-sudy/recap-en-to-mm/blob/main/app/gemini_tts.py"
click node_editor "https://github.com/n-sudy/recap-en-to-mm/blob/main/app/narration_editor.py"
click node_sync "https://github.com/n-sudy/recap-en-to-mm/blob/main/app/core.py"
click node_subtitles "https://github.com/n-sudy/recap-en-to-mm/blob/main/app/subtitle_png.py"
click node_subtitle_style "https://github.com/n-sudy/recap-en-to-mm/blob/main/app/subtitle_fonts.py"
click node_overlays "https://github.com/n-sudy/recap-en-to-mm/blob/main/services/text_overlay_service.py"
click node_preview "https://github.com/n-sudy/recap-en-to-mm/blob/main/app/preview_tools.py"
click node_split_ui "https://github.com/n-sudy/recap-en-to-mm/blob/main/app/splitter_tab.py"
click node_split_engine "https://github.com/n-sudy/recap-en-to-mm/blob/main/app/splitter.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_controller,node_transcription,node_ai,node_planner,node_tts,node_editor toneBlue
class node_sync,node_subtitles,node_subtitle_style,node_overlays,node_preview toneAmber
class node_split_ui,node_split_engine,node_gemini toneMint
class node_user,node_edge_tts,node_video,node_final,node_parts toneIndigo
```

## Components

### Recap narration

- [Main controls](https://github.com/n-sudy/recap-en-to-mm/blob/main/app/controller.py): `app/controller.py`
- [Whisper transcription](https://github.com/n-sudy/recap-en-to-mm/blob/main/recap_runtime/services/whisper_service.py): `recap_runtime/services/whisper_service.py`
- [Gemini language service](https://github.com/n-sudy/recap-en-to-mm/blob/main/recap_runtime/services/ai_service.py): `recap_runtime/services/ai_service.py`
- [Story and timing plan](https://github.com/n-sudy/recap-en-to-mm/blob/main/app/recap_planner.py): `app/recap_planner.py`
- [Narrator speech](https://github.com/n-sudy/recap-en-to-mm/blob/main/app/gemini_tts.py): `app/gemini_tts.py`
- [Narration editor](https://github.com/n-sudy/recap-en-to-mm/blob/main/app/narration_editor.py): `app/narration_editor.py`

### Sync and presentation

- [Smart Sync renderer](https://github.com/n-sudy/recap-en-to-mm/blob/main/app/core.py): `app/core.py`
- [Subtitle cues](https://github.com/n-sudy/recap-en-to-mm/blob/main/app/subtitle_png.py): `app/subtitle_png.py`
- [Subtitle fonts](https://github.com/n-sudy/recap-en-to-mm/blob/main/app/subtitle_fonts.py): `app/subtitle_fonts.py`
- [Text overlays](https://github.com/n-sudy/recap-en-to-mm/blob/main/services/text_overlay_service.py): `services/text_overlay_service.py`
- [Frame preview](https://github.com/n-sudy/recap-en-to-mm/blob/main/app/preview_tools.py): `app/preview_tools.py`

### Video splitting

- [Splitter controls](https://github.com/n-sudy/recap-en-to-mm/blob/main/app/splitter_tab.py): `app/splitter_tab.py`
- [Cut and encode](https://github.com/n-sudy/recap-en-to-mm/blob/main/app/splitter.py): `app/splitter.py`

### Other components

- **Video creator**
- **Edge TTS**
- **Gemini API**
- **Source video**
- **Myanmar video**
- **Video parts**

## Connections

- Video creator → Main controls: selects and configures (evidence: `README.md`)
- Main controls → Story and timing plan: starts planning (evidence: `app/controller.py`)
- Story and timing plan → Whisper transcription: transcribes locally (evidence: `README.md`)
- Story and timing plan → Gemini language service: translates and audits (evidence: `README.md`)
- Story and timing plan → Narrator speech: generates narration
- Narrator speech → Gemini API: requests speech
- Story and timing plan → Gemini API: requests translation (evidence: `README.md`)
- Main controls → Smart Sync renderer: starts rendering (evidence: `app/controller.py`)
- Smart Sync renderer → Source video: reads video (evidence: `README.md`)
- Smart Sync renderer → Edge TTS: uses Myanmar voice (evidence: `README.md`)
- Smart Sync renderer → Myanmar video: renders synchronized output (evidence: `README.md`)
- Smart Sync renderer → Subtitle cues: prepares subtitle track (evidence: `app/core.py`)
- Subtitle cues → Subtitle fonts: uses font helpers (evidence: `app/recap_subtitles.py`)
- Smart Sync renderer → Text overlays: renders text overlays (evidence: `app/core.py`)
- Main controls → Frame preview: refreshes preview (evidence: `app/controller.py`)
- Main controls → Narration editor: opens text editor (evidence: `app/controller.py`)
- Narration editor → Story and timing plan: updates narration plan (evidence: `app/narration_editor.py`)
- Video creator → Splitter controls: chooses split settings (evidence: `README.md`)
- Splitter controls → Cut and encode: starts splitting (evidence: `app/splitter_tab.py`)
- Cut and encode → Source video: reads source (evidence: `README.md`)
- Cut and encode → Video parts: encodes segments (evidence: `README.md`)
