← Back to portfolio

PROJECT NOTES · PYTHON

From dialogue to video

ContentSynth automates short-form video creation: it turns text conversations into voiced, subtitled videos and publishes the result to Instagram.

View ContentSynth on GitHub See live output on Instagram

The pipeline

The application is organized as a sequence of stages coordinated by a Python entry point. Dialogue pairs are stored in Firebase Realtime Database; each run takes the next item, generates its media, publishes it, and records progress so a later run can continue with the next item.

  1. Load dialogue. A one-time import puts dialogue pairs from a CSV file into Firebase. The database also tracks the current item and the total number of entries.
  2. Generate character voices. The audio engine uses F5-TTS to create speech for both sides of the conversation. The README describes these two audio generations as parallel work.
  3. Synchronize subtitles. The subtitle engine prepares an SRT subtitle track and aligns it with the generated audio timing.
  4. Compose the video. MoviePy combines the base video or imagery, character audio, and subtitles, then exports the finished MP4.
  5. Publish and advance. The Instagram integration uploads the video through the Meta Graph API. The application then advances the Firebase index so the next run can process another dialogue.

How the pieces fit

main.py coordinates the workflow. Separate audio, subtitle, video, and Instagram modules keep each media step distinct, while Firebase provides the dialogue queue and processing state. A scheduled run can repeat the workflow over time without manually selecting each conversation.

The README also documents environment-based configuration for Firebase and Instagram credentials, plus encrypted Firebase credentials. API tokens and secrets stay outside the source code.

Live output

The generated videos are published on @detoxing_quotes.

Instagram profile for detoxing_quotes showing its quote video grid
The @detoxing_quotes Instagram profile and published video grid.

Try it and inspect the code

See the generated posts on Instagram or explore the implementation and setup instructions in the repository.

Open @detoxing_quotes Open the GitHub repository