# π¬ DarijaSubtitler
### Automatic Moroccan Darija β English Subtitle Generation
**OpenAI Whisper** speech recognition Β· **GPT-4o** translation Β· **FFmpeg** video burning
---
## β¨ Features
| Feature | Details |
|---|---|
| π **Darija Transcription** | OpenAI Whisper detects Moroccan Darija (Ψ―Ψ§Ψ±Ψ¬Ψ©) with French/Arabic code-switching |
| π **GPT-4o Translation** | Natural, contextual English translation preserving meaning and tone |
| β **Live Editor** | Edit any subtitle segment inline before exporting |
| π¨ **Style Customiser** | Font, colour, opacity, position, animation, outline, shadow β full control |
| π **9-position grid** | Top/Centre/Bottom Γ Left/Centre/Right |
| π¬ **Video Export** | Subtitles burned directly into MP4 via FFmpeg |
| π **Subtitle Export** | SRT, WebVTT, plain TXT, formatted DOCX transcript |
| π **Dashboard** | Processing stats, history, success rate |
| π **Speaker Detection** | Automatic speaker labelling from pause patterns |
| β¨ **AI Enhancement** | Auto-punctuation, smart segmentation, sync optimisation |
| π **Large Files** | Chunked upload support up to 5 GB |
---
## π Architecture
```
βββββββββββββββββββββββββββββββββββββββββββββββββββ
β Browser β
β React + TypeScript + Vite β
β Upload Β· Editor Β· Style Panel Β· Dashboard β
ββββββββββββββββββββββββ¬βββββββββββββββββββββββββββ
β HTTP / REST
ββββββββββββββββββββββββΌβββββββββββββββββββββββββββ
β FastAPI Backend (Python) β
β /api/videos /api/subtitles /api/exports β
β ββββββββββββββ ββββββββββββββββ β
β β Whisper β β GPT-4o β OpenAI API β
β β (transcribeβ β (translate) β β
β ββββββββββββββ ββββββββββββββββ β
β ββββββββββββββββββββββββββββββββββ β
β β FFmpeg β β
β β extract audio Β· burn subs β β
β ββββββββββββββββββββββββββββββββββ β¦