| name | generate-voiceover |
| description | Synthesize a spoken voiceover for the video from the narration script via HeyGen TTS. Use after generate-script and before customize-composition. Runs by default for every video unless the user asked for no narration. |
Generate the voiceover
Every video gets a spoken voiceover by default — it's the single biggest
lift in perceived quality. You turn the narration script into audio with
HeyGen's text-to-speech, then hand the audio URL to the composition.
Skip this step only if the user's prompt explicitly asks for no narration —
"no voiceover", "silent", "ambient only", "music only", "text only". When you
skip, leave voiceover_url empty and tell the user the video is silent.
Inputs
- The narration script from generate-script (a short spoken line or two,
sized to the starter's duration — distinct from the on-screen copy).
- The chosen composition's
manifest.json, which carries a
recommended_voice_id (the default voice for that starter).
Steps
-
Pick a voice. Use the starter's recommended_voice_id unless the user's
prompt gives tone direction — then override from the catalog below.
-
Synthesize with the TTS helper:
set +x
RESULT=$(python3 /.agents/workspace/scripts/tts_client.py \
"<narration script>" "<voice_id>")
AUDIO_URL=$(echo "$RESULT" | jq -r '.audio_url')
DURATION=$(echo "" | jq -r )