Set voiceover scripts
voiceover_batchSet voiceover text and/or generate speech for many clips in ONE call. Per entry: "set_text" (clip_index + text; clears the clip's existing speech and word timings until generate_speech runs), "generate_speech" (async TTS; wait: true blocks until it lands), "set_and_generate" (both). Entries apply in order, one result each; all text lands in one save, TTS runs async per clip after.
Address by clip_index, or clip_id (survives inserts/reorders); never both needed.
Text: [emotion] tags are performed, not spoken; use sparingly before the phrase they colour. pause:1.5s = exact silence (also as a lead-in or hold; get_clip's voiceover_text shows existing pauses: keep them). The [pause] tag is a performed beat of no set length.
Sizing: ~2–2.5 words/s; then read real durations back (get_clip once
busyis empty) before timing visuals.Sync points: if the clip's voiceover_text has
<SYNC_MARKER N>tokens (a recording's on-screen actions), new text must keep every one, once each, in order, where that action is narrated; else the entry is refused (the refusal lists them). A new script that does not follow the recording:clear_sync_markers: truedrops all the clip's sync points. A marker at the very end of the text has no word to anchor to: the result'swarningssay so.Generating speech RESCALES the clip: duration becomes the audio length and EVERY element's start_time, end_time and keyframe timestamps are multiplied by new ÷ old (6s → 1.02s turns [0, 1.6] into [0, 0.27]); zooms that fall under the minimum are DROPPED. It lands after this call returns. So generate speech BEFORE placing timed elements, then re-read what your elements became.
Concurrency: parallel-safe per clip voiceover (fan out by clip; safe alongside element edits). The same clip's voiceover twice concurrently → the later is REJECTED, nothing written: re-read and re-apply. Not concurrently with whole-clip/project writes (update_clips on that clip, structural clip ops, add_audio, update_project).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"project_id": "<project_id>",
"entries": "<entries>"
},
"name": "voiceover_batch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| wait | No | true: block until this call's speech lands so durations, voiceover_words and element times read next are real (`ready`: each clip's new duration). Bounded by wait_seconds; the rest come back as durations_pending (poll get_clip(select:['busy'])). Use whenever the next step times to the voiceover. In run_script it counts against the script's time. | |
| entries | Yes | Voiceover entries — at least one. | |
| project_id | Yes | Project ID | |
| wait_seconds | No | With wait: the most to wait, default 50s; anything over 55s waits 55s. |