Set voiceover scripts
voiceover_batchSet voiceover text and/or trigger speech generation for any number of clips in a single call.
Each entry chooses its own action:
"set_text" — set transcript for a clip (clip_index + text)
"generate_speech" — async TTS for a clip (clip_id; returns immediately)
"set_and_generate" — set text and kick off TTS in one entry (clip_index + clip_id + text)
Entries within one call are applied in order. Returns one result object per input entry. All text-set actions land in ONE save; the TTS for generate/set_and_generate runs async per clip after.
IMPORTANT — generating speech retimes the clip: when audio is generated (generate_speech / set_and_generate), the clip's duration is reset to the spoken audio length (auto-fit). Any element start/end times you authored against a planned duration then play against that new length, and element time past the audio end is cut. So size timings against the spoken length: estimate it up front with estimate_duration (or generate speech BEFORE placing time-sensitive elements), then read the clip back after generation to confirm its final duration.
Concurrency: parallel-safe (conflict domain: a clip's voiceover). The server merges each clip's voiceover under a per-guide lock and preserves that clip's elements, so you can fan voiceover work out across subagents by clip — and it's safe to run alongside element edits. Two edits to the SAME clip's voiceover serialize. Do NOT run concurrently with whole-clip/whole-project mutations on the same guide (update_clips on that clip, structural clip ops, add_audio, update_project).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| entries | Yes | Voiceover entries — at least one. | |
| project_id | Yes | Project ID |