Logo Lanfrica

zaidchguiri-tech/darija-caption-studio

Domain:

natural language processing

Record type:

software
Creator:
zai
Host:
# πŸŽ™ Darija Caption Studio **Hybrid Whisper + AI Moroccan Darija caption generator** Upload any audio or video file to get AI-generated Moroccan Darija captions with timestamps, improved by GPT-4o-mini (or Gemini 2.0 Flash), with optional translation to English, French, or Arabic and export to SRT/VTT/TXT/JSON. --- ## πŸ—οΈ Architecture ``` Audio/Video Upload ↓ Flask Server ↓ ffmpeg (β†’ /tmp audio extraction) ↓ OpenAI Whisper-1 (raw Darija timestamps) ↓ GPT-4o-mini OR Gemini 2.0 Flash (Darija language refinement) ↓ JSON: { segments: [{id, start, end, text, whisper_text, refine_engine}] } ↓ Frontend editor + translation + export ``` --- ## πŸš€ Deploy to Vercel (Recommended) ### Prerequisites - Vercel account (free, no credit card for hobby tier) - OpenAI API key - Optional: Gemini API key ### Step 1 β€” Push to GitHub ```bash git clone github.com cd darija-caption-studio git init git add . git commit -m "Darija Caption Studio v2" git push -u origin main ``` ### Step 2 β€” Deploy on Vercel ```bash npm i -g vercel vercel --prod ``` Or via the dashboard: vercel.com β†’ Import β†’ connect GitHub repo β†’ Add Environment Variables β†’ Deploy. ### Step 3 β€” Set Environment Variables In Vercel dashboard β†’ Settings β†’ Environment Variables: | Variable | Required | Description | |---|---|---| | `OPENAI_API_KEY` | βœ… | Your OpenAI API key | | `OPENAI_BASE_URL` | ❌ | Proxy base URL (optional) | | `GEMINI_API_KEY` | ❌ | Gemini API key (GPT fallback used if omitted) | | `CF_AIG_TOKEN` | ❌ | Proxy auth token (optional) | ### Step 4 β€” Done! πŸŽ‰ Your app will be live at: `darija-caption-studio.verce…` --- ## 🐳 Deploy to Fly.io ```bash # Install flyctl curl -fsSL fly.io | sh export PATH="$HOME/.fly/bin:$PATH" # Login flyctl auth login # Set secrets flyctl secrets set OPENAI_API_KEY___="sk-..." --app darija-caption-studio flyctl secrets set GEMINI_API_KEY___="..." --app darija-caption-studio # Deploy flyc …