Skip to main content
Glama

Text To Audio

text_to_audio

Convert text into speech audio with TTS models. Choose preset voices, clone a reference speaker, or design a voice from a description for narration and accessibility.

Instructions

Convert text to speech audio using TTS models.

Generates natural-sounding speech from text with customizable voice and parameters.

Supports three modes, and each model implements exactly one — passing the wrong one is rejected with a 422. Leave mode unset and it is taken from the model's own card:

  • custom_voice: pick a preset voice (e.g. Kokoro, Chatterbox)

  • voice_clone: reproduce the speaker in ref_audio (+ optional ref_text)

  • voice_design: build a voice from an instruct description

lang and voice values are per-model and listed under each model in the "Available models" section below (Kokoro: lang 'en-us', voice 'af_alloy'; Qwen3: lang 'English'). Leave them unset to use the model's own defaults.

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>",
      "model": "<model>"
    },
    "name": "text_to_audio"
  }
}

Input Schema

NameRequiredDescriptionDefault
langNoLanguage code as the model expects it (Kokoro: 'en-us'; Qwen3: 'English'). Defaults to the model's own
modeNoTTS mode: 'custom_voice', 'voice_clone' or 'voice_design'. Leave unset to use the mode the model supports
textYesText to convert to speech
modelYesTTS model name (e.g., 'Kokoro')
speedNoSpeech speed. Per model (see 'speed' in the model list; most fix it at 1). Defaults to the model's own
voiceNoVoice name from the model list for the chosen lang (e.g. Kokoro en-us 'af_alloy'). Defaults to the model's default voice for that language
instructNoVoice description for voice_design models (required there), or style/emotion control in custom_voice mode, e.g. 'speak slowly and warmly'
ref_textNoTranscript of ref_audio, improves cloning accuracy
ref_audioNoReference audio sample to clone (data URI, base64 or URL). Requires mode='voice_clone'
sample_rateNoSample rate in Hz. Defaults to the model's own
webhook_urlNoHTTPS URL for deAPI to call when this job finishes. Notifies your own systems; the tool still returns the result here
audio_formatNoOutput format. Defaults to the model's own; most models emit mp3 only
webhook_secretNo32-255 char key deAPI signs the callback with (HMAC-SHA256). Needs webhook_url. A secret given in chat stays in the transcript

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.3

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full burden and does disclose useful behavior: 422 on mode mismatch, per-model defaults for lang/voice/speed, and mode-specific requirements. It omits the biggest behavioral unknown for a 13-parameter media-generation call — whether it blocks and returns audio or queues a job requiring check_job_status polling — and says nothing about rate limits or content restrictions.

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 a compact mode list with aligned labels — efficient and scannable. It loses a point for pointing readers to an 'Available models section below' that does not exist in the text, and for slightly repetitive default statements.

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

Completeness3/5

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

An output schema exists so return values need not be explained, and the mode logic is well covered. However, for a 13-parameter tool with model-dependent values it never says how to discover models (the get_available_models sibling is never referenced), and the dangling 'section below' reference makes the per-model lang/voice guidance unusable as written.

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 description coverage is 100%, so the schema already documents every parameter and the baseline is 3. The description reinforces the mode/parameter coupling (voice for custom_voice, ref_audio for voice_clone, instruct for voice_design) and gives concrete value examples, but this mostly restates what the per-property descriptions already say.

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

Purpose4/5

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

States a specific verb and resource: 'Convert text to speech audio using TTS models', then enumerates the three generation modes so the agent understands the surface area. It never names the sibling text_to_audio_price or explains how this differs from it, so the only missing piece is explicit sibling differentiation.

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

Usage Guidelines4/5

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

Gives clear model-selection rules: each model implements exactly one mode, wrong-mode calls return 422, and unset mode is taken from the model card. That is strong guidance for the mode decision, but there is no guidance on when to call this versus the price or job-status siblings.

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