Skip to main content
Glama

Synthesize speech

synthesize

Convert text to speech in a specified voice, returning audio as base64 with duration and token count. Supports format selection, speed adjustment, and continuation for lengthy texts.

Instructions

Turn text into speech in a named voice. Returns the audio as base64 plus the audio duration and token count. format is "wav" by default; "flac" is the same samples, losslessly, at about a quarter the size: worth asking for when the reply is saved to a file rather than played. "mp3" and "opus" are lossy and smaller still, for a reply sent on to a chat or a phone. Same text, voice and seed give the same audio, and the same bytes in every format but ogg and opus, whose container carries a random stream serial. Omit language to read the text in the voice's own language; pass one only to read text in a language the voice was not enrolled in. speed is playback speed in [0.5, 2.0] with the pitch preserved: 1.0, the default, is an exact bypass. To read a long text as several calls without an audible restart at each join, pass the previous reply's continuation list back as previous_tokens. Check truncated: when true the utterance hit the token cap and the speech is cut off mid-sentence. A refusal comes back as error with error_kind "bad_request": something about this call to fix, and supported or available listing what would have worked, and code from the same frozen catalog the HTTP and gRPC doors name the condition with.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
seedNo
textYes
speedNo
voiceYes
formatNowav
languageNo
previous_tokensNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A5/5.0
Behavior5/5

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

No annotations are provided, so the description carries the full behavioral burden. It discloses determinism (same text/voice/seed gives same audio), format-specific container quirks (random stream serial for ogg/opus), speed behavior with pitch preservation, continuation semantics, truncation detection, and a detailed error structure with `error_kind`, `supported`/`available`, and `code`. This is exemplary transparency.

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

Conciseness5/5

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

Although long, every sentence earns its place. The description leads with the core action and return value, then systematically covers formats, determinism, language, speed, continuation, truncation, and errors. There is no redundancy or fluff; the structure is logical and front-loaded with the most important facts.

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?

Given the tool's complexity (7 parameters, multiple formats, error cases, continuation), and the absence of any annotations, the description is remarkably complete. It explains what is returned, how parameters affect behavior, how to chain calls, and how to interpret errors. An output schema exists, so the return structure is likely further defined, but the description covers everything an agent needs to call it correctly.

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 0%, so the description must explain every parameter. It does: `format` with defaults and size trade-offs, `language` with default behavior, `speed` with range and pitch preservation, `previous_tokens` with its continuation purpose, and `seed` via the determinism statement. `text` and `voice` are self-evident but still implied. The description adds meaning beyond the bare schema.

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?

The description opens with a crisp verb+object pair ('Turn text into speech in a named voice') and then specifies the exact resource and the output shape (base64 audio, duration, token count). It clearly distinguishes itself from the siblings (list_voices, describe) by focusing on synthesis rather than enumeration or inspection.

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?

The description gives explicit when-to-use guidance for each format ('worth asking for when the reply is saved to a file rather than played', 'for a reply sent on to a chat or a phone'), explains when to omit or pass `language`, and describes the continuation mechanism for long texts. It even tells the caller to check `truncated` to detect cut-off speech. This is proactive, alternative-aware guidance.

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

Deploy Server

Other Tools