Skip to main content
Glama

Generate speech

generate_speech

Generate a voiceover: pick a voice that fits the character. Standard voice: Kore. The text is read word for word in any language it is written in. style directs the delivery in plain words; speakers turns "Name: line" text into a dialogue with a voice per speaker. Read builtin-voiceover first: it lists the tags for laughs, sighs, whispers, shouts and pauses, and a tag not on that list is dropped. It answers at once with a Job ID and the media is made in the background: start every generation you need, keep working, then call wait_for_jobs with all their Job IDs to get each Asset ID for patch_film. transcribe_asset gives its word times. Uses credits by the character: 1,000 characters use 9 credits. Put one voiceover or one whole dialogue in one call rather than splitting it into many short lines. To speak in the voice of a person in the user's footage (their own voice saying new words, a line in another language, a voice for a talking photo with lip_sync), pass voiceAssetId with a stretch of 3 to 15 seconds where only that person speaks: the voice is cloned from it, and tags, style and speakers do not apply. A cloned voice uses 10 credits a call.

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": {
      "text": "<text>",
      "voice": "<voice>",
      "style": "<style>",
      "speakers": "<speakers>",
      "voiceAssetId": "<voiceAssetId>",
      "voiceStartSeconds": "<voiceStartSeconds>",
      "voiceEndSeconds": "<voiceEndSeconds>",
      "language": "<language>",
      "projectId": "<projectId>"
    },
    "name": "generate_speech"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYes
styleYesHow to say the whole take, in plain words: "a terrified, urgent whisper", "a deep, slow nature-documentary narrator", "a football commentator who screams the goal". It is never spoken. Give every take one; null is a flat read.
voiceYesVoice for the call, or for lines without a speaker name in a dialogue. Female: Kore (firm), Zephyr (bright), Leda (youthful), Aoede (breezy), Callirrhoe (easy-going), Autonoe (bright), Despina (smooth), Erinome (clear), Laomedeia (upbeat), Achernar (soft), Gacrux (mature), Pulcherrima (forward), Vindemiatrix (gentle), Sulafat (warm). Male: Charon (informative), Puck (upbeat), Fenrir (excitable), Orus (firm), Enceladus (breathy), Iapetus (clear), Umbriel (easy-going), Algieba (smooth), Algenib (gravelly), Rasalgethi (informative), Alnilam (firm), Schedar (even), Achird (friendly), Zubenelgenubi (casual), Sadachbia (lively), Sadaltager (knowledgeable). With voiceAssetId the person's own voice speaks instead.
languageYesWith voiceAssetId: the language text is written in, so numbers and abbreviations are read in it: en_us (English (US)), en_gb (English (UK)), fr_fr (French), de (German), es (Spanish), it (Italian), pt_br (Portuguese (Brazil)), ja (Japanese), cmn (Mandarin Chinese), ko (Korean). The cloned voice speaks it whatever language the stretch is in. null is en_us. Without voiceAssetId it is not used: the stock voices read the text in any language.
speakersYesFor a dialogue: each speaker's name and voice, with every line of text written as "Name: words". Each turn is spoken in its speaker's voice and the turns are joined into one audio asset. null for one voice.
projectIdYesThe project this call runs on without changing the open project. null (or leaving it out) uses the open project. wait_for_jobs takes the projectId of the calls that started the jobs.
voiceAssetIdYesA video or sound asset in which the person whose voice to speak in talks: the speech is then in that person's own voice, cloned from their speech, instead of voice. Give voiceStartSeconds and voiceEndSeconds with a stretch of 3 to 15 seconds where only that person speaks, clearly, with no music under it: read_transcript gives the times. With it, style and speakers are null, and text is at most 600 characters. null speaks in voice.
voiceEndSecondsYesSource second of voiceAssetId where the stretch ends.
voiceStartSecondsYesSource second of voiceAssetId where the stretch of that person speaking starts, with voiceEndSeconds. null for both uses the whole asset, which is then 3 to 15 seconds long.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • addedInput schema / properties / language
      Added value: +{
      +  "anyOf": [
      +    {
      +      "enum": [
      +        "en_us",
      +        "en_gb",
      +        "fr_fr",
      +        "de",
      +        "es",
      +        "it",
      +        "pt_br",
      +        "ja",
      +        "cmn",
      +        "ko"
      +      ],
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "With voiceAssetId: the language text is written in, so numbers and abbreviations are read in it: en_us (English (US)), en_gb (English (UK)), fr_fr (French), de (German), es (Spanish), it (Italian), pt_br (Portuguese (Brazil)), ja (Japanese), cmn (Mandarin Chinese), ko (Korean). The cloned voice speaks it whatever language the stretch is in. null is en_us. Without voiceAssetId it is not used: the stock voices read the text in any language."
      +}
    • changedInput schema / properties / voice / description
      Previous value: -"Voice for the call, or for lines without a speaker name in a dialogue. Female: Kore (firm), Zephyr (bright), Leda (youthful), Aoede (breezy), Callirrhoe (easy-going), Autonoe (bright), Despina (smooth), Erinome (clear), Laomedeia (upbeat), Achernar (soft), Gacrux (mature), Pulcherrima (forward), Vindemiatrix (gentle), Sulafat (warm). Male: Charon (informative), Puck (upbeat), Fenrir (excitable), Orus (firm), Enceladus (breathy), Iapetus (clear), Umbriel (easy-going), Algieba (smooth), Algenib (gravelly), Rasalgethi (informative), Alnilam (firm), Schedar (even), Achird (friendly), Zubenelgenubi (casual), Sadachbia (lively), Sadaltager (knowledgeable)."New value: +"Voice for the call, or for lines without a speaker name in a dialogue. Female: Kore (firm), Zephyr (bright), Leda (youthful), Aoede (breezy), Callirrhoe (easy-going), Autonoe (bright), Despina (smooth), Erinome (clear), Laomedeia (upbeat), Achernar (soft), Gacrux (mature), Pulcherrima (forward), Vindemiatrix (gentle), Sulafat (warm). Male: Charon (informative), Puck (upbeat), Fenrir (excitable), Orus (firm), Enceladus (breathy), Iapetus (clear), Umbriel (easy-going), Algieba (smooth), Algenib (gravelly), Rasalgethi (informative), Alnilam (firm), Schedar (even), Achird (friendly), Zubenelgenubi (casual), Sadachbia (lively), Sadaltager (knowledgeable). With voiceAssetId the person's own voice speaks instead."
    • addedInput schema / properties / voiceAssetId
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "A video or sound asset in which the person whose voice to speak in talks: the speech is then in that person's own voice, cloned from their speech, instead of voice. Give voiceStartSeconds and voiceEndSeconds with a stretch of 3 to 15 seconds where only that person speaks, clearly, with no music under it: read_transcript gives the times. With it, style and speakers are null, and text is at most 600 characters. null speaks in voice."
      +}
    • addedInput schema / properties / voiceEndSeconds
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "number"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Source second of voiceAssetId where the stretch ends."
      +}
    • addedInput schema / properties / voiceStartSeconds
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "number"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Source second of voiceAssetId where the stretch of that person speaking starts, with voiceEndSeconds. null for both uses the whole asset, which is then 3 to 15 seconds long."
      +}
    • changedInput schema / required
      Previous value: -[
      -  "text",
      -  "voice",
      -  "style",
      -  "speakers",
      -  "projectId"
      -]New value: +[
      +  "text",
      +  "voice",
      +  "style",
      +  "speakers",
      +  "voiceAssetId",
      +  "voiceStartSeconds",
      +  "voiceEndSeconds",
      +  "language",
      +  "projectId"
      +]
  2. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only say it is a non-idempotent, non-destructive write; the description adds the crucial behavior that the call returns a Job ID immediately and renders in the background, that unsupported tags are silently dropped, that cloned voices use 10 credits per call versus 9 credits per 1,000 characters, and that style/speakers are ignored with voiceAssetId.

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?

Front-loaded with purpose then async flow, credits, and the cloning path, and nearly every sentence carries operational weight. It is a dense single paragraph, though, and the tag/style/speaker clauses could be grouped more cleanly.

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 9-parameter async generation tool with no output schema, it covers the full lifecycle (Job ID, background render, wait_for_jobs to Asset ID, handoff to patch_film), cost, prerequisites, and the alternate cloned-voice mode, leaving nothing an agent needs unstated.

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

Parameters4/5

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

Schema coverage is 89%, so the baseline is 3, but the description still adds the default ('Standard voice: Kore'), the intent behind voice choice ('pick a voice that fits the character'), the 'Name: line' convention that turns text into a dialogue, and the 3-to-15-second clean-speech requirement for the clone stretch.

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?

Opens with a specific verb+resource ('Generate a voiceover') and immediately scopes it as text-to-speech with stock or cloned voices, which separates it from generate_music, generate_sfx and lip_sync without the agent needing to open the schema.

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?

Gives explicit routing and sequencing: read builtin-voiceover first for supported tags, batch all generations then call wait_for_jobs with every Job ID, use transcribe_asset for word times, and pass voiceAssetId only when the person in the footage should speak. It also warns against splitting one voiceover into many short calls.

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.