The six-stage pipeline
direktor is a chain of six small models rather than one big one. Text enters at stage 1; a 1920×1080 MP4 leaves at stage 6. Every stage writes a file you can inspect, edit and resume from — this is the whole design.
Script
your text file → script.txt
OpenAI stage 02Narration
script.txt → narration.wav
Replicate stage 03Transcription
narration.wav → transcript.json
Replicate stage 04Image
transcript.json → image_prompts.json
OpenAI stage 05Image
image_prompts.json → stills/*.webp
Replicate stage 06Composition
stills + narration.wav → output.mp4
LocalScript generation
OpenAI · gpt-4-turbo-preview
GPT-4 reads your input text and rewrites it as a single-narrator, podcast-style script — spoken cadence, no headings or bullet artefacts. This is the one stage that reshapes your words; everything after it is faithful to this script.
Narration (TTS)
Replicate · suno-ai/bark
BARK synthesises the script into a spoken audio track. The WAV is uploaded to your S3-compatible bucket so the next stage can fetch it by URL. Swap the voice or model with BARK_MODEL.
Transcription
Replicate · distil-whisper
Distil-Whisper transcribes the narration into timestamped chunks. These timestamps are what let direktor line images up with the audio — each ~30-second window becomes one visual segment.
Image prompts
OpenAI · gpt-4-turbo-preview
For each transcript segment, GPT-4 writes one image prompt describing an illustrative still. This is the file most worth hand-editing — tune a prompt here and only its segment re-renders.
Image generation
Replicate · black-forest-labs/flux-schnell
FLUX-schnell renders one 16:9 still per prompt. Images are cached per segment, so re-running after an edit only regenerates the prompts you changed. Point FLUX_MODEL elsewhere to try a different image model.
Composition
Local · FFmpeg (concat demuxer + drawtext)
FFmpeg converts the stills to PNG, holds each for the duration of its transcript segment, lays the narration underneath, and (optionally) draws keyword overlays. The result is a 1920×1080 MP4. This stage is fully local and deterministic.
See it run
The quickstart takes you from pip install to output.mp4, including how to stop and resume any stage.