Skip to main content
Glama

Set voiceover scripts

voiceover_batch
Destructive

Set 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 (returns immediately; wait: true blocks until it lands)

  • "set_and_generate" — set text and kick off TTS in one entry (+ text)

Emotion tags: put ElevenLabs emotion/audio tags in square brackets in the text, e.g. "[excited] And it just works." or "[whispers] Here's the trick." — the voice performs them and they're never spoken or shown. Use them sparingly, before the phrase they colour.

Pauses: pause:1.5s in the text is exact silence of that length, anywhere including the very start (a lead-in before the first word) and the very end (a hold after the last); word timings account for it, and get_clip's voiceover_text shows existing pauses the same way, so keep them when you rewrite. Unlike the [pause] emotion tag, which is a performed beat of no set length.

Sizing a script: narration runs roughly 2–2.5 words per second depending on the voice — size the script to the target length, generate the voiceover, then read the real clip durations back (get_clip, once busy is empty) before timing visuals.

Address a clip the same way as everywhere else: clip_index. Pass clip_id instead if you already have it — it survives clips being inserted or reordered mid-build — but you never need both; whichever you omit is looked up once for the whole call.

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.

Sync points: if get_clip's voiceover_text for the clip contains <SYNC_MARKER N> tokens (a screen recording's on-screen actions), your new text must carry every one of them, each exactly once and in order, placed where that action is narrated. Otherwise the entry is refused and nothing is written. Rephrase the words between the tokens freely.

IMPORTANT — generating speech RESCALES the whole clip, it does not clamp it: when audio is generated (generate_speech / set_and_generate), the clip's duration is reset to the spoken audio length, and then EVERY element on that clip is retimed proportionally by (new duration ÷ old duration). start_time, end_time and every keyframe timestamp are multiplied by that factor. Nothing is merely truncated — on a 6s clip that becomes 1.02s, an animation you placed at [0, 1.6] ends up at [0, 0.27]. Zoom elements whose window falls under the minimum after scaling are DROPPED entirely. Generation is async, so this lands AFTER this call has already returned success. So: generate speech BEFORE placing time-sensitive elements — then re-read the clip and check what your elements actually became, not just the clip 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 concurrent edits to the SAME clip's voiceover do not last-write-win — both claim that clip's voiceover path, so the later one is REJECTED and nothing is written; re-read and re-apply. 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

TableJSON Schema
NameRequiredDescriptionDefault
waitNotrue blocks until the speech this call starts has landed, so the clip durations, voiceover_words and element times you read next are the real ones: `ready` lists each landed clip with its new duration. Bounded by wait_seconds; clips still generating then come back under durations_pending (poll get_clip(select:['busy']) for those). Use it whenever the next step times anything to the voiceover. Inside run_script the wait counts against the script's time.
entriesYesVoiceover entries — at least one.
project_idYesProject ID
wait_secondsNoWith wait: the most to wait, default 50s.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / entries / items / oneOf
      Previous value: -[
      -  {
      -    "properties": {
      -      "action": {
      -        "const": "set_text",
      -        "description": "Write the voiceover transcript onto the clip without generating audio.",
      -        "type": "string"
      -      },
      -      "clip_index": {
      -        "description": "Zero-based clip index",
      -        "maximum": 9007199254740991,
      -        "minimum": 0,
      -        "type": "integer"
      -      },
      -      "text": {
      -        "description": "Voiceover transcript",
      -        "minLength": 1,
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "action",
      -      "clip_index",
      -      "text"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "properties": {
      -      "action": {
      -        "const": "generate_speech",
      -        "description": "Generate speech audio from the transcript already set on the clip.",
      -        "type": "string"
      -      },
      -      "clip_id": {
      -        "description": "Clip ID. Give this or clip_index.",
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "clip_index": {
      -        "description": "Zero-based clip index. Give this or clip_id.",
      -        "maximum": 9007199254740991,
      -        "minimum": 0,
      -        "type": "integer"
      -      }
      -    },
      -    "required": [
      -      "action"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "properties": {
      -      "action": {
      -        "const": "set_and_generate",
      -        "description": "Write the transcript and generate its speech audio in one step.",
      -        "type": "string"
      -      },
      -      "clip_id": {
      -        "description": "Clip ID. Give this or clip_index.",
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "clip_index": {
      -        "description": "Zero-based clip index. Give this or clip_id.",
      -        "maximum": 9007199254740991,
      -        "minimum": 0,
      -        "type": "integer"
      -      },
      -      "text": {
      -        "description": "Voiceover transcript",
      -        "minLength": 1,
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "action",
      -      "text"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "properties": {
      +      "action": {
      +        "const": "set_text",
      +        "description": "Write the voiceover transcript onto the clip without generating audio.",
      +        "type": "string"
      +      },
      +      "clip_index": {
      +        "description": "Zero-based clip index",
      +        "maximum": 9007199254740991,
      +        "minimum": 0,
      +        "type": "integer"
      +      },
      +      "text": {
      +        "description": "Voiceover transcript. Emotion and audio tags in square brackets ([excited], [whispers], [laughs]) are performed, not spoken. <pause:1.5s> is exact timed silence, allowed at the very start (a lead-in) and end (a hold).",
      +        "minLength": 1,
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "action",
      +      "clip_index",
      +      "text"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "action": {
      +        "const": "generate_speech",
      +        "description": "Generate speech audio from the transcript already set on the clip.",
      +        "type": "string"
      +      },
      +      "clip_id": {
      +        "description": "Clip ID. Give this or clip_index.",
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "clip_index": {
      +        "description": "Zero-based clip index. Give this or clip_id.",
      +        "maximum": 9007199254740991,
      +        "minimum": 0,
      +        "type": "integer"
      +      }
      +    },
      +    "required": [
      +      "action"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "action": {
      +        "const": "set_and_generate",
      +        "description": "Write the transcript and generate its speech audio in one step.",
      +        "type": "string"
      +      },
      +      "clip_id": {
      +        "description": "Clip ID. Give this or clip_index.",
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "clip_index": {
      +        "description": "Zero-based clip index. Give this or clip_id.",
      +        "maximum": 9007199254740991,
      +        "minimum": 0,
      +        "type": "integer"
      +      },
      +      "text": {
      +        "description": "Voiceover transcript. Emotion and audio tags in square brackets ([excited], [whispers], [laughs]) are performed, not spoken. <pause:1.5s> is exact timed silence, allowed at the very start (a lead-in) and end (a hold).",
      +        "minLength": 1,
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "action",
      +      "text"
      +    ],
      +    "type": "object"
      +  }
      +]
    • addedInput schema / properties / wait
      Added value: +{
      +  "description": "true blocks until the speech this call starts has landed, so the clip durations, voiceover_words and element times you read next are the real ones: `ready` lists each landed clip with its new duration. Bounded by wait_seconds; clips still generating then come back under durations_pending (poll get_clip(select:['busy']) for those). Use it whenever the next step times anything to the voiceover. Inside run_script the wait counts against the script's time.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / wait_seconds
      Added value: +{
      +  "description": "With wait: the most to wait, default 50s.",
      +  "maximum": 55,
      +  "minimum": 1,
      +  "type": "integer"
      +}
  2. Changed4 schema fields changed
    • removedInput schema / properties / context
      Removed value: -{
      -  "description": "Explain in 15-25 words, in third person, why this tool is called and how it supports the user's goal. For analytics only. You MUST describe only the abstract purpose of the tool call. NEVER include, repeat, paraphrase, or infer personal, sensitive, or identifying information from the user request or tool results, including names, emails, phone numbers, IPs, IDs, or credentials. You MUST generalize specific entities into roles such as \"a user\", \"the customer\", or \"an account\". Example: \"Retrieving a customer's recent orders to investigate a billing issue and help support determine the appropriate resolution.\"",
      -  "type": "string"
      -}
    • removedInput schema / properties / conversation_id
      Removed value: -{
      -  "description": "Echo the conversation_id from the server's previous response. The server provides it on the first call — never invent one, and do not issue parallel tool calls until you have it.",
      -  "type": "string"
      -}
    • removedInput schema / properties / llm_model
      Removed value: -{
      -  "description": "The exact model identifier you (the assistant) are running as, taken from your system prompt or environment (e.g. \"claude-opus-4-8\", \"gpt-5.2\"). Used for analytics only. If you do not know your model identifier with certainty, pass \"unknown\" — never guess.",
      -  "type": "string"
      -}
    • changedInput schema / required
      Previous value: -[
      -  "project_id",
      -  "entries",
      -  "context",
      -  "llm_model"
      -]New value: +[
      +  "project_id",
      +  "entries"
      +]
  3. Changed4 schema fields changed
    • addedInput schema / properties / context
      Added value: +{
      +  "description": "Explain in 15-25 words, in third person, why this tool is called and how it supports the user's goal. For analytics only. You MUST describe only the abstract purpose of the tool call. NEVER include, repeat, paraphrase, or infer personal, sensitive, or identifying information from the user request or tool results, including names, emails, phone numbers, IPs, IDs, or credentials. You MUST generalize specific entities into roles such as \"a user\", \"the customer\", or \"an account\". Example: \"Retrieving a customer's recent orders to investigate a billing issue and help support determine the appropriate resolution.\"",
      +  "type": "string"
      +}
    • addedInput schema / properties / conversation_id
      Added value: +{
      +  "description": "Echo the conversation_id from the server's previous response. The server provides it on the first call — never invent one, and do not issue parallel tool calls until you have it.",
      +  "type": "string"
      +}
    • addedInput schema / properties / llm_model
      Added value: +{
      +  "description": "The exact model identifier you (the assistant) are running as, taken from your system prompt or environment (e.g. \"claude-opus-4-8\", \"gpt-5.2\"). Used for analytics only. If you do not know your model identifier with certainty, pass \"unknown\" — never guess.",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "project_id",
      -  "entries"
      -]New value: +[
      +  "project_id",
      +  "entries",
      +  "context",
      +  "llm_model"
      +]
  4. Changed4 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / additionalProperties
      Removed value: -false
    • removedInput schema / properties / entries / items / anyOf
      Removed value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "action": {
      -        "const": "set_text",
      -        "description": "Write the voiceover transcript onto the clip without generating audio.",
      -        "type": "string"
      -      },
      -      "clip_index": {
      -        "description": "Zero-based clip index",
      -        "minimum": 0,
      -        "type": "integer"
      -      },
      -      "text": {
      -        "description": "Voiceover transcript",
      -        "minLength": 1,
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "action",
      -      "clip_index",
      -      "text"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "action": {
      -        "const": "generate_speech",
      -        "description": "Generate speech audio from the transcript already set on the clip.",
      -        "type": "string"
      -      },
      -      "clip_id": {
      -        "description": "Clip ID. Give this or clip_index.",
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "clip_index": {
      -        "description": "Zero-based clip index. Give this or clip_id.",
      -        "minimum": 0,
      -        "type": "integer"
      -      }
      -    },
      -    "required": [
      -      "action"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "action": {
      -        "const": "set_and_generate",
      -        "description": "Write the transcript and generate its speech audio in one step.",
      -        "type": "string"
      -      },
      -      "clip_id": {
      -        "description": "Clip ID. Give this or clip_index.",
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "clip_index": {
      -        "description": "Zero-based clip index. Give this or clip_id.",
      -        "minimum": 0,
      -        "type": "integer"
      -      },
      -      "text": {
      -        "description": "Voiceover transcript",
      -        "minLength": 1,
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "action",
      -      "text"
      -    ],
      -    "type": "object"
      -  }
      -]
    • addedInput schema / properties / entries / items / oneOf
      Added value: +[
      +  {
      +    "properties": {
      +      "action": {
      +        "const": "set_text",
      +        "description": "Write the voiceover transcript onto the clip without generating audio.",
      +        "type": "string"
      +      },
      +      "clip_index": {
      +        "description": "Zero-based clip index",
      +        "maximum": 9007199254740991,
      +        "minimum": 0,
      +        "type": "integer"
      +      },
      +      "text": {
      +        "description": "Voiceover transcript",
      +        "minLength": 1,
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "action",
      +      "clip_index",
      +      "text"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "action": {
      +        "const": "generate_speech",
      +        "description": "Generate speech audio from the transcript already set on the clip.",
      +        "type": "string"
      +      },
      +      "clip_id": {
      +        "description": "Clip ID. Give this or clip_index.",
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "clip_index": {
      +        "description": "Zero-based clip index. Give this or clip_id.",
      +        "maximum": 9007199254740991,
      +        "minimum": 0,
      +        "type": "integer"
      +      }
      +    },
      +    "required": [
      +      "action"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "action": {
      +        "const": "set_and_generate",
      +        "description": "Write the transcript and generate its speech audio in one step.",
      +        "type": "string"
      +      },
      +      "clip_id": {
      +        "description": "Clip ID. Give this or clip_index.",
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "clip_index": {
      +        "description": "Zero-based clip index. Give this or clip_id.",
      +        "maximum": 9007199254740991,
      +        "minimum": 0,
      +        "type": "integer"
      +      },
      +      "text": {
      +        "description": "Voiceover transcript",
      +        "minLength": 1,
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "action",
      +      "text"
      +    ],
      +    "type": "object"
      +  }
      +]
  5. Changed1 schema field changed
    • changedInput schema / properties / entries / items / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "action": {
      -        "const": "set_text",
      -        "description": "Write the voiceover transcript onto the clip without generating audio.",
      -        "type": "string"
      -      },
      -      "clip_index": {
      -        "description": "Zero-based clip index",
      -        "minimum": 0,
      -        "type": "integer"
      -      },
      -      "text": {
      -        "description": "Voiceover transcript",
      -        "minLength": 1,
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "action",
      -      "clip_index",
      -      "text"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "action": {
      -        "const": "generate_speech",
      -        "description": "Generate speech audio from the transcript already set on the clip.",
      -        "type": "string"
      -      },
      -      "clip_id": {
      -        "description": "Clip ID",
      -        "minLength": 1,
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "action",
      -      "clip_id"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "action": {
      -        "const": "set_and_generate",
      -        "description": "Write the transcript and generate its speech audio in one step.",
      -        "type": "string"
      -      },
      -      "clip_id": {
      -        "description": "Clip ID",
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "clip_index": {
      -        "description": "Zero-based clip index",
      -        "minimum": 0,
      -        "type": "integer"
      -      },
      -      "text": {
      -        "description": "Voiceover transcript",
      -        "minLength": 1,
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "action",
      -      "clip_index",
      -      "clip_id",
      -      "text"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "action": {
      +        "const": "set_text",
      +        "description": "Write the voiceover transcript onto the clip without generating audio.",
      +        "type": "string"
      +      },
      +      "clip_index": {
      +        "description": "Zero-based clip index",
      +        "minimum": 0,
      +        "type": "integer"
      +      },
      +      "text": {
      +        "description": "Voiceover transcript",
      +        "minLength": 1,
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "action",
      +      "clip_index",
      +      "text"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "action": {
      +        "const": "generate_speech",
      +        "description": "Generate speech audio from the transcript already set on the clip.",
      +        "type": "string"
      +      },
      +      "clip_id": {
      +        "description": "Clip ID. Give this or clip_index.",
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "clip_index": {
      +        "description": "Zero-based clip index. Give this or clip_id.",
      +        "minimum": 0,
      +        "type": "integer"
      +      }
      +    },
      +    "required": [
      +      "action"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "action": {
      +        "const": "set_and_generate",
      +        "description": "Write the transcript and generate its speech audio in one step.",
      +        "type": "string"
      +      },
      +      "clip_id": {
      +        "description": "Clip ID. Give this or clip_index.",
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "clip_index": {
      +        "description": "Zero-based clip index. Give this or clip_id.",
      +        "minimum": 0,
      +        "type": "integer"
      +      },
      +      "text": {
      +        "description": "Voiceover transcript",
      +        "minLength": 1,
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "action",
      +      "text"
      +    ],
      +    "type": "object"
      +  }
      +]
  6. First observed

TDQS

A4.9/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Dramatically exceeds the annotations (destructiveHint=true). It discloses the critical rescaling behavior (clip duration resets to audio length, every element retimed proportionally, zoom elements dropped), the async non-blocking nature, the sync-marker refusal rule, the one-save batching, and the concurrency conflict domain with its reject-not-overwrite semantics. This is exactly the behavioral context an agent cannot get from annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Long but well-structured with sections, bullet actions, and front-loaded mutation warning. Every section earns its place, though the pause/emotion-tag prose is somewhat verbose and duplicated in the schema. Not wasteful, but dense enough that it's near the edge of acceptable length.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a high-risk, rescaled, async, concurrent mutation with no output schema, the description covers causality (rescale), timing (async completion after return), concurrency, and validation (sync markers). An agent has everything needed to call it correctly and avoid the destructive pitfalls.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is high, but the description adds real meaning: it explains that clip_index/clip_id are alternatives (pass one, omit the other, looked up once for the whole call), the per-entry action selection with required fields, and wait semantics tied to durations_pending/`busy`. Adds materially beyond the schema's own descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

That the tool sets voiceover text and/or triggers TTS for any number of clips in one batched call is stated precisely, and the per-entry action breakdown (set_text/generate_speech/set_and_generate) delineates the individual behaviors. The distinction from sibling add_audio/set_voice is inferable from the explicit mutation described.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit sequencing guidance: generate speech BEFORE placing time-sensitive elements; use wait when the next step times anything; do not run concurrently with whole-clip/whole-project mutations (update_clips, add_audio, update_project). It names the excluded operations and the alternatives (use clip_id for stability, fan out across subagents by clip).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.