Text to speech (Piper, English voices)
job_tts_piperSpeaks 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
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | The English text to speak, up to 2000 characters. | |
| voice | No | Voice model. Default en_US-ljspeech-medium. | |
| speaker | No | Speaker number 0-903, used only with voice en_US-libritts_r-medium; omitted = the voice's default speaker. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| empty | Yes | true = nothing found, not charged | |
| output | Yes | {audio_b64 (WAV), format, bytes, sample_rate, duration_seconds, voice} | |
| source | No | ||
| charged | No | ||
| measured | No | wall seconds of this run | |
| charged_usd | Yes | ||
| receipt_quote_id | Yes |