Text to Speech

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
}
FieldTypeRequiredDescription
modelstringyesTTS model id, e.g. svara-tts-v1.
voicestringyesVoice id or short id (see Voices).
inputstringyesText to synthesize. Supports emotion tags like <happy>.
response_formatstringnomp3 (default), wav, opus, flac, pcm, ulaw.
speednumberno0.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

FormatNotes
mp3_44100_128Default. 44.1 kHz, 128 kbps.
wav_24000Uncompressed PCM WAV, 24 kHz.
opus_48000_64Low-latency streaming.
flac_24000Lossless.
pcm_24000Raw 16-bit PCM, 24 kHz.
ulaw_8000Telephony (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.