Turn script lines into talking character videos
For each line of a script in Supabase, make the speech, a video prompt, an animated clip and a lip-synced talking video
Version 1
What it does
Five webhooks run five stages for one video project. Each reads the project's scripts and their lines from Supabase and loops through the lines.
The speech stage voices each line with the character's ElevenLabs voice, uploads the audio to Cloudinary and saves it with the character's image. The prompt stage has an OpenAI model study the image and dialogue and write an image-to-video prompt. The video stage animates the image with Kling on fal.ai. Two lip-sync stages add the voice: one syncs the audio onto the Kling clip, the other makes a talking video straight from the image and audio. Every result URL is saved on the script line, using the characters and voices from the character workflow.