Skip to main content
Glama

Generate Speech (TTS) with Replicate

replicate_generate_speech

Convert text into natural-sounding speech audio with selectable voices, models, and speed; returns a playable link to the generated audio.

Instructions

Convert text to natural-sounding speech.

DISPLAY REQUIREMENT — after this tool returns successfully, include the URL printed in the tool's text content as a markdown link [Speech](URL) in your reply so the user can play it. URLs expire in ~24h.

Args:

  • text (string, 1-5000): Text to synthesize.

  • model (string, default "kokoro"): Curated key (kokoro, minimax-speech, chatterbox, gemini-tts, grok-tts) or "owner/name[:version]".

  • voice (string, optional): Voice ID. For Kokoro: af_bella, af_sarah, am_adam, am_michael, bf_emma, bf_isabella, etc. (a-f = American female, b-f = British female, a-m = American male, b-m = British male).

  • speed (0.5-2.0, optional): Speech rate.

  • extra_input (object, optional): Model-specific extras (e.g. {audio_prompt: ""} for voice cloning with Chatterbox).

  • download (boolean, default true).

  • timeout_ms: Default 300000.

Returns: PredictionResult. local_paths contain WAV/MP3 files.

Input Schema

NameRequiredDescriptionDefault
textYesText to synthesize.
modelNoEither a curated key (kokoro, minimax-speech, chatterbox, gemini-tts, grok-tts) or a Replicate identifier.kokoro
speedNoSpeech speed multiplier (0.5-2.0).
voiceNoVoice identifier. Kokoro examples: af_bella, am_adam, bf_emma. Check model docs for full list.
downloadNoWhether to download the generated files locally. Default true. When false, only Replicate URLs are returned (URLs expire after ~24h).
timeout_msNoMax ms to wait for the prediction. If exceeded, returns the prediction ID so you can poll via replicate_get_prediction. Default: 300000 (5min).
extra_inputNoAdditional model-specific inputs.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv3.3.1
    • addedInput schema / properties / extra_input / propertyNames
      Added value: +{
      +  "type": "string"
      +}
  2. First observedv3.2.3

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already cover the safety profile (non-read-only, open-world, non-idempotent), and the description adds genuinely new operational facts: URLs expire in ~24h, download=false returns only expiring Replicate URLs, and exceeding timeout_ms returns a prediction ID to poll via replicate_get_prediction. Only the return contents are thin, but there is no output schema so this is a minor gap.

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?

The core action, the display requirement, and the args are front-loaded and each block earns its place. Some arg lines restate the schema nearly verbatim (text, speed), but the added conventions keep the list useful rather than padding.

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

Completeness4/5

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

With no output schema, the description carries the return burden and does explain PredictionResult and local_paths containing WAV/MP3 files. Combined with the expiry and download semantics, an agent has enough to call it correctly; only the failure/partial-success shape is 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 100%, so baseline is 3, but the description adds meaning beyond the schema: the voice-prefix convention (af_/bf_/am_/bm_) and a concrete Chatterbox voice-cloning payload for extra_input. The model parameter's curated-key vs owner/name[:version] duality is also spelled out more concretely than in the schema.

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+resource: 'Convert text to natural-sounding speech', which matches the TTS title and is distinguishable from siblings like replicate_generate_image or replicate_transcribe_audio. It does not explicitly distinguish itself from the closest siblings (replicate_generate_audio, replicate_clone_voice), so differentiation is only implied by the title.

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

Usage Guidelines3/5

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

Usage is implied by the model list (Kokoro default, Chatterbox for voice cloning) but there is no explicit statement of when to use this instead of replicate_generate_audio or replicate_clone_voice. An agent must infer the routing from the enum values and extra_input example.

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