import json
storyboard_assets = []
for i, step_name in enumerate(raw_steps):
# 1. Generate Script using Text Generation
# We ask for a short sentence.
script_prompt = f"""
Write a single conversational sentence for a video narration explaining the step: '{step_name}'
for an app described as: '{app_description}'.
Keep it encouraging and brief.
"""
# Generate text
text_response = coll.generate_text(prompt=script_prompt, model_name="pro")
script_text = text_response["output"]
# 2. Generate Voiceover
audio_asset = coll.generate_voice(
text=script_text,
voice_name="Aria"
)
# 3. Generate Image
# We create a consistent art style prompt
image_prompt = f"""
A minimal, stippling black ballpoint pen illustration of a user interface or scene representing: '{step_name}'.
Context: {app_description}.
Clean white background, professional storyboard style.
"""
image_asset = coll.generate_image(
prompt=image_prompt
)
# Store everything we need for the timeline
storyboard_assets.append({
"step_name": step_name,
"audio_id": audio_asset.id,
"image_id": image_asset.id,
"duration": float(audio_asset.length)
})