Skip to main content
Glama
Tapra MCP server
by tapra-ai

Text to speech

text_to_speech

Generate spoken audio from text in Tunisian Derja, French, English, or mixed language with selectable voices and inline nonverbal effect tags.

Instructions

Speak text in Tunisian Derja (Arabic script or Arabizi), French, English, or a mix with one of the Tapra voices, with Tunisian pronunciation. Voices: amal = Mature woman. Warm, grounded, everyday Tunisian.; salma = Younger woman. Lighter and brighter, conversational.; salah = Man with a big, sharp (aigu) voice that carries. Strong presence.; fahmi = Middle-aged man. Normal, natural male voice.; leo = Young man. Light and energetic. The default Tapra voice.. Add non-verbal effects inline with tags (not billed): [euh] breathy hesitation; [aaa] long filler while thinking; [hmm] closed-mouth "mmm"; [ahem] clears the throat; [ouf] tired sigh; [breath] out-breath, "haah"; [stutter] repeats the first sound of the next word; put it right before that word. Example: "[euh] ma na3rafch, [breath] khalli nchouf". Saves the audio in the chosen format (wav by default, 18 other formats). Voice cloning and custom voice design are not currently available: if the user asks to clone a voice, say so and offer these voices. Costs money per character. For long scripts or narration timed to a video, use create_voiceover.

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

Input Schema

NameRequiredDescriptionDefault
textYesWhat to say. May include effect tags like [euh], [hmm], [breath].
speedNoSpeaking rate, 0.7-1.3. Default 1.0.
voiceNoTapra voice: amal = Mature woman. Warm, grounded, everyday Tunisian.; salma = Younger woman. Lighter and brighter, conversational.; salah = Man with a big, sharp (aigu) voice that carries. Strong presence.; fahmi = Middle-aged man. Normal, natural male voice.; leo = Young man. Light and energetic. The default Tapra voice.. Voice cloning is not available.leo
formatNoAudio format: wav (default, lossless), mp3_<rate>_<kbps>, pcm_<rate> (16-bit WAV), ulaw_8000 / alaw_8000 (telephony), opus_48000_<kbps> (Ogg Opus). mp3, opus, ulaw and alaw need ffmpeg.wav
qualityNo"full" = best quality; "flash" = same voices, about 5x faster and cheaper.full
output_pathNoWhere to save. Relative paths go in the output folder; the extension follows the format.
max_cost_tndNoRefuse to run if the estimated cost is above this many TND. Defaults to TAPRA_MAX_COST_TND when set.
convert_arabiziNoConvert Arabizi (e.g. "3aslema") to Arabic script before speaking, as Voice Studio does.
duration_secondsNoForce the clip to last this long.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.2

TDQS

A4.2/5.0
Behavior4/5

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

Goes well beyond the annotations by disclosing the billing model (costs money per character, effect tags are not billed) and the fact that audio is written to a file in a chosen format. It also flags a capability gap (no voice cloning or custom voice design) and the ffmpeg dependency is left to the schema. Missing only rate/size limits and overwrite behavior for output_path.

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

Conciseness3/5

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

Purpose is front-loaded and the effect-tag catalogue with its example is genuinely useful, but the five voice descriptions are duplicated word-for-word from the voice parameter's schema description, consuming a large share of the text without adding information.

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 story and does so: audio is saved to disk in the requested format, default wav. Combined with full schema coverage across 9 parameters, an agent has what it needs to call this correctly; only output_path collision/overwrite semantics are 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 the baseline is 3. The description earns extra credit by expanding the inline effect-tag vocabulary with a definition per tag and a worked example, which the schema only gestures at with three sample tags. The voice list, however, is copied verbatim from the schema and adds nothing.

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?

States a specific verb and resource (speak text) plus the supported languages, voice family, and pronunciation model. It also explicitly routes long-form narration to create_voiceover, so the agent can distinguish it from the nearest sibling without opening either schema.

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 one explicit alternative with its triggering condition ("For long scripts or narration timed to a video, use create_voiceover") and a fallback script for unsupported requests (voice cloning: say it's unavailable and offer these voices). It does not mention list_voices or play_audio, so the routing picture is clear but not exhaustive.

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