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 1 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 1 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
textYesThe words, read at about 2 words (13 characters) a second: 60 s hold about 120 words. Fit the script to its time before you generate: a take that runs long is paid again.
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. Up to 300 characters: a longer one is shortened there. 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. Changed1 schema field changed
    • addedInput schema / properties / text / description
      Added value: +"The words, read at about 2 words (13 characters) a second: 60 s hold about 120 words. Fit the script to its time before you generate: a take that runs long is paid again."
  2. Changed1 schema field changed
    • changedInput schema / properties / style / description
      Previous value: -"How 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."New value: +"How 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. Up to 300 characters: a longer one is shortened there. Give every take one; null is a flat read."
  3. 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"
      +]
  4. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations only say it is a non-read-only, non-idempotent, open-world write; the description adds the important behavior: it returns a Job ID immediately and renders in the background, tags not on the builtin list are discarded, style over 300 characters is truncated, cloned-voice text caps at 600 characters, and regenerating an over-long take costs credits again. Cost is disclosed at 1 credit per 1,000 characters and 1 credit per cloned-voice call, which is genuinely useful pre-call context. It stops short of describing failure modes such as insufficient credits or job failure output.

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?

It is a single dense paragraph rather than a structured list, which makes the mid-paragraph credit and cloning rules harder to scan. However, almost every sentence earns its place and the essential purpose is front-loaded, so the size is defensible for a 9-parameter async generation tool.

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?

Covers the full lifecycle an agent needs: prerequisite tag list, async job handoff, downstream consumers (wait_for_jobs, patch_film, transcribe_asset, lip_sync), cost model, and the 3-15 second clean-speech window required for cloning. With no output schema, the description still tells the agent what comes back (a Job ID, then an Asset ID).

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

Parameters3/5

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

Schema coverage is 100% and the schema descriptions are already richer than the prose (voice enum with gender/character labels, language enum with locale names, voiceStart/End semantics). The description adds a little framing — text is read word for word in any language, speakers turns "Name: line" into per-speaker turns — but mostly restates what the schema already defines. Baseline 3 applies when the schema does the heavy lifting.

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 concrete verb+resource ("Generate a voiceover") and immediately scopes it against siblings by naming read builtin-voiceover, wait_for_jobs, transcribe_asset and patch_film. It also distinguishes two operating modes (stock voice vs. cloned voice via voiceAssetId) so an agent can tell which behavior it will get.

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 routing: read builtin-voiceover first because unknown tags are silently dropped, then start all generations, then call wait_for_jobs with the Job IDs to collect Asset IDs for patch_film. It also states a batching preference ("Put one voiceover or one whole dialogue in one call rather than splitting it") and the conditions that select the cloned-voice path.

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.