Capabilities

Text to speech

Pendra turns text into natural-sounding speech — voice announcements, audio versions of written content, spoken responses for assistants and IVR systems. It's OpenAI-compatible, so existing text-to-speech code works against Pendra by swapping the base URL and key.

Generate speech

Send a model and the input text (up to 4,096 characters). The response body is the audio itself — a WAV file, ready to save or play. Pick a voice from the model's preset voices, or leave it out to use the model's default.

import requests

resp = requests.post(
    "https://api.pendra.ai/v1/audio/speech",
    headers={"Authorization": "Bearer pdr_sk_..."},
    json={
        "model": "your-speech-model",  # an id from /models?type=speech
        "input": "Good morning, and welcome to today's briefing.",
    },
)
resp.raise_for_status()
with open("speech.wav", "wb") as f:
    f.write(resp.content)

Voices

Each speech model ships with a set of preset voices. The /models?type=speech entry for a model lists its voices and the default_voice used when a request omits one — so you can present the choices in your product and default sensibly. Passing a voice the model doesn't have returns a clear error.

Output format

Speech is returned as a WAV file (24 kHz, 16-bit mono) — playable everywhere and easy to convert if you need something smaller for delivery (e.g. ffmpeg -i speech.wav speech.mp3).

Finding speech models

Text to speech is rolling out. The speech models available to you are the ones your connected workers serve — list them, with their voices, at /models?type=speech, and pass one of their ids as model.

For every field and the full response details, see the Text to speech API reference.