Skip to main content
Glama

Text to speech (Piper, English voices)

job_tts_piper

Speaks English text aloud with Piper TTS and returns a WAV file (base64, 22.05 kHz mono). Voices: en_US-ljspeech-medium (one female voice, public domain) and en_US-libritts_r-medium (904 speakers, CC BY 4.0). Use it for voice-overs, audio versions of short texts and spoken prompts. Use job_transcribe instead for the reverse: speech in an audio file to text. Cost: at most $0.0001254 per call (measured CPU time), debited from your balance; an empty result or failed run is free. Auth: Authorization: Bearer (POST https://api.gaents.com/v1/accounts, $0.10 free credit); with no key the call returns a signed 402 quote payable in BSV or USDC via x402. Errors (isError, error.code): 400 missing_param/bad_param, 401 bad_api_key, 402 low balance, 429 busy (retry in seconds), 503 job_unavailable, 502 job_failed (refunded).

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": "job_tts_piper"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYesThe English text to speak, up to 2000 characters.
voiceNoVoice model. Default en_US-ljspeech-medium.
speakerNoSpeaker number 0-903, used only with voice en_US-libritts_r-medium; omitted = the voice's default speaker.

Output Schema

NameRequiredDescriptionDefault
emptyYestrue = nothing found, not charged
outputYes{audio_b64 (WAV), format, bytes, sample_rate, duration_seconds, voice}
sourceNo
chargedNo
measuredNowall seconds of this run
charged_usdYes
receipt_quote_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "charged": {
      +      "type": "boolean"
      +    },
      +    "charged_usd": {
      +      "type": "number"
      +    },
      +    "empty": {
      +      "description": "true = nothing found, not charged",
      +      "type": "boolean"
      +    },
      +    "measured": {
      +      "description": "wall seconds of this run",
      +      "type": "object"
      +    },
      +    "output": {
      +      "description": "{audio_b64 (WAV), format, bytes, sample_rate, duration_seconds, voice}",
      +      "properties": {
      +        "audio_b64": {
      +          "description": "WAV"
      +        },
      +        "bytes": {},
      +        "duration_seconds": {},
      +        "format": {},
      +        "sample_rate": {},
      +        "voice": {}
      +      },
      +      "type": "object"
      +    },
      +    "receipt_quote_id": {
      +      "type": "string"
      +    },
      +    "source": {
      +      "type": "object"
      +    }
      +  },
      +  "required": [
      +    "output",
      +    "empty",
      +    "charged_usd",
      +    "receipt_quote_id"
      +  ],
      +  "type": "object"
      +}
  2. Changed13 schema fields changed
    • addedInput schema / additionalProperties
      Added value: +false
    • changedInput schema / properties / speaker / description
      Previous value: -"speaker index (libritts_r only)"New value: +"Speaker number 0-903, used only with voice en_US-libritts_r-medium; omitted = the voice's default speaker."
    • addedInput schema / properties / speaker / examples
      Added value: +[
      +  0
      +]
    • addedInput schema / properties / speaker / maximum
      Added value: +903
    • addedInput schema / properties / speaker / minimum
      Added value: +0
    • changedInput schema / properties / text / description
      Previous value: -"the text to speak"New value: +"The English text to speak, up to 2000 characters."
    • addedInput schema / properties / text / examples
      Added value: +[
      +  "Hello from gaents."
      +]
    • addedInput schema / properties / text / maxLength
      Added value: +2000
    • addedInput schema / properties / text / minLength
      Added value: +1
    • changedInput schema / properties / voice / description
      Previous value: -"voice (default en_US-ljspeech-medium)"New value: +"Voice model. Default en_US-ljspeech-medium."
    • addedInput schema / properties / voice / examples
      Added value: +[
      +  "en_US-ljspeech-medium"
      +]
    • addedInput schema / properties / voice / maxLength
      Added value: +40
    • addedInput schema / properties / voice / minLength
      Added value: +1
  3. Added

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond the annotations by disclosing output encoding and sample rate, per-call cost and its basis (measured CPU time), the free-on-failure/empty-result rule, the auth header and 402 x402 fallback payment flow, and an enumerated error code table with retry guidance for 429. Annotations only say non-read-only, non-destructive and non-idempotent; the description supplies the operational context an agent actually needs.

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?

Purpose, output format, voice options and the sibling alternative are front-loaded, and the cost/auth/error material is compressed into compact clauses. The auth-and-error run is dense enough to be a slightly heavy read, but every sentence carries actionable information.

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?

For a three-parameter job tool with an output schema, the description covers what it produces, what it costs, how to authenticate, how payment fallback works, and how each failure mode surfaces. Nothing needed to invoke it or interpret a failure is missing, and the return format is mentioned even though an output schema exists.

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 by explaining that en_US-ljspeech-medium is a single female public-domain voice while en_US-libritts_r-medium carries 904 speakers, which clarifies when the speaker parameter is meaningful. It does not restate the 'speaker only applies with libritts' constraint as explicitly as the schema does, but the voice characterization is genuine added meaning.

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?

Opens with a specific verb and resource ('Speaks English text aloud with Piper TTS') and immediately states the artifact produced ('returns a WAV file, base64, 22.05 kHz mono'). It explicitly distinguishes itself from job_transcribe, so an agent can pick between the two 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 Guidelines5/5

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

Gives concrete use cases ('voice-overs, audio versions of short texts and spoken prompts') and names the alternative with the inverse condition ('Use job_transcribe instead for the reverse: speech in an audio file to text'). When-to-use and when-to-use-something-else are both explicit.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources