Two-Sided Fit Loop
Underrun and overrun both break lip sync. Ajilamu measures the signed delta of every take. It time-stretches up to 8 percent long or 5 percent short, and triggers targeted Gemini rewrites beyond those thresholds.
Ajilamu dubs creator video into another language. It holds every line inside the slot the original speaker left for it. The system measures each synthesized take against its slot, repairs misfits, and records every API cost.
The architecture comprises a Go server, a Svelte 5 workspace, and an append-only ledger in ClickHouse.
Traditional dubbing either stretches dialogue awkwardly or lets speech drift across mouth movements. Ajilamu treats dialogue timing as a hard physical constraint. Fit is two-sided. A line that underruns breaks lip sync as severely as a line that overruns.
flowchart LR
A[Source Video] --> B[Gemini 3.8 Flash
Watch & Segment]
B --> C[Gemini 3.8 Flash
Translate to Slot]
C --> D[Google Cloud Chirp 3 HD
Voice Synthesis]
D --> E[ffprobe
Measure Signed Delta]
E --> F{Fit Check
Within +8% or -5%?}
F -- Yes: within budget --> G[ffmpeg atempo
Time Stretch]
F -- No: beyond budget --> H[Gemini Rewrite
Shorter / Fuller]
H --> D
G --> I[ffmpeg Mux
Preserve Audio Bed]
I --> J[Dubbed Video]
classDef default fill:#090d15,stroke:#334155,color:#f1f5f9
classDef highlight fill:#1e293b,stroke:#f59e0b,color:#f8fafc
classDef accent fill:#082f49,stroke:#06b6d4,color:#38bdf8
class B,C,D highlight
class E,F,G,H accent
Two-Sided Fit Loop
Underrun and overrun both break lip sync. Ajilamu measures the signed delta of every take. It time-stretches up to 8 percent long or 5 percent short, and triggers targeted Gemini rewrites beyond those thresholds.
Immutable Ledger
Every take, edit, and charge appends to ClickHouse. The system stores waveform peak arrays directly in the database. Creators can inspect history and time-travel to earlier commits.
Lossless Audio Bed
Original background audio, music, and ambient noise survive everywhere outside dialogue slots. The export preserves source sample rate and channel layout.
Nanodollar Precision
The internal cost engine tracks charges in nanodollars. A 75-second sample dub costs $0.023414 across segmentation, translation, and synthesis calls.