Text to Speech
POST /v1/audio/speech — synthesize speech from text. OpenAI-compatible.
Request
{
"model": "svara-tts-v1",
"voice": "tara",
"input": "The text to synthesize.",
"response_format": "mp3",
"speed": 1.0
}| Field | Type | Required | Description |
|---|---|---|---|
model | string | yes | TTS model id, e.g. svara-tts-v1. |
voice | string | yes | Voice id or short id (see Voices). |
input | string | yes | Text to synthesize. Supports emotion tags like <happy>. |
response_format | string | no | mp3 (default), wav, opus, flac, pcm, ulaw. |
speed | number | no | 0.5–2.0. Default 1.0. |
Response
Binary audio in the requested response_format. The Content-Type matches the
format (e.g. audio/mpeg for mp3).
Output formats
| Format | Notes |
|---|---|
mp3_44100_128 | Default. 44.1 kHz, 128 kbps. |
wav_24000 | Uncompressed PCM WAV, 24 kHz. |
opus_48000_64 | Low-latency streaming. |
flac_24000 | Lossless. |
pcm_24000 | Raw 16-bit PCM, 24 kHz. |
ulaw_8000 | Telephony (8 kHz µ-law). |
Emotion
Prefix text with an emotion tag to steer delivery:
<happy> This is wonderful news!
<sad> I'm sorry to hear that.