An AI-powered Streamlit app that generates short two-character dialogue reels — complete with TTS audio, speaker diarization, character expression overlays, AI image inserts, and auto-captions.
- Script generation via Gemini 2.5 Flash (customisable tone, humor level, topic)
- Multi-speaker TTS using Gemini's preview TTS model
- Speaker diarization via AssemblyAI (maps audio segments back to each character)
- Expression detection — Gemini picks the right character face per dialogue line
- AI image overlays — keyword-matched images generated and timed to the script
- Auto-captioning via PyCaps
- ffmpeg-based video renderer with background video support
git clone https://github.com/your-username/your-repo-name.git
cd your-repo-namepip install -r requirements.txtNote:
pyannote.audiorequires a Hugging Face token and model access. See pyannote docs for setup.
ffmpegmust also be installed on your system: https://ffmpeg.org/download.html
Copy the example env file and fill in your keys:
cp .env.example .envThen edit .env:
GEMINI_API_KEY=your_gemini_key_here
ASSEMBLY_AI_API_KEY=your_assemblyai_key_here
ZAPCAP_API_KEY=your_zapcap_key_here
ZAPCAP_TEMPLATE_ID=your_template_id_here
You can also enter keys directly in the 🔑 API Keys tab inside the app — manual entries override the .env values.
streamlit run main.py| Service | Link |
|---|---|
| Gemini | https://aistudio.google.com/api-keys |
| AssemblyAI | https://www.assemblyai.com/dashboard/api-keys |
| Zapcap | https://platform.zapcap.ai/dashboard/api-key |
| Zapcap Templates | https://platform.zapcap.ai/dashboard/templates |
├── main.py # Main Streamlit app
├── character_data.py # Character image path mappings
├── assets/
│ ├── backgrounds/ # Background video files
│ ├── characters/ # Character PNG overlays
│ └── temp/ # Temp storage for uploaded backgrounds
├── pycaps_templates_own/ # PyCaps caption templates
├── .env.example # Template for environment variables
├── requirements.txt
└── README.md
- Generated audio, images, and video files are listed in
.gitignoreand will not be committed. - Never commit your
.envfile. - The
assets/folder (character images, backgrounds) is not included in this repo — add your own or contact the author.