Skip to main content
Glama

Generate Speech (TTS) with Replicate

replicate_generate_speech

Generate natural-sounding speech from text. Choose from multiple models and customize voice, speed, and style.

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

TableJSON 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.
Behavior4/5

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

Annotations already indicate non-readonly, open world, non-idempotent, non-destructive. Beyond that, the description adds valuable context: URL expiration (~24h), timeout behavior with polling fallback, voice cloning capability via extra_input, and download behavior. No contradiction with annotations.

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?

Well-structured with clear sections: purpose, display requirement, parameter list, return info. Each sentence is purposeful, no redundancy. Slightly verbose but appropriate for the complexity.

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?

Covers most aspects but lacks detailed return value documentation (no output schema). Missing error handling or rate limit info. The description mentions local_paths and URL behavior but does not fully describe PredictionResult structure.

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%, providing baseline 3. Description adds significant meaning: lists curated model keys, explains voice naming convention, gives concrete example for extra_input, and details timeout_ms behavior. Goes beyond 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?

The description clearly states 'Convert text to natural-sounding speech,' providing a specific verb and resource. It does not explicitly differentiate from sibling tools like replicate_generate_audio or replicate_clone_voice, but the function is unambiguous.

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?

No direct guidance on when to use this tool versus alternatives. The description implies usage for TTS but lacks explicit comparisons or exclusionary criteria, limiting agent decision-making.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/sena-labs/replicate-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server