Skip to main content
Use this when you need the audio in a particular format: a phone line, a web player, a mobile app, or files you store.

Turn it on

Set audio_config in the request: container for the format, sample_rate, and bitrate for MP3. This example asks for a 24 kHz MP3:
Which format to use:

Examples

The same Hindi sentence (Timbre v3.0, voice Shivani) in each format. The sample rate and size are from the returned files. Two things the files show: µ-law and A-law came back at 8 kHz although 48 kHz was asked for, as documented; and the 32 kbps MP3 came back at 22.05 kHz although 24 kHz was asked for. See Things to watch for.

By interface

POST /api/v1/tts/inference returns the whole audio as the response body, with the Content-Type of the format (table below). Save it as a file.

By model

Timbre v3.0 and Timbre v2.5 offer the same formats and sample rates. Voice cloning lists WAV, raw PCM, MP3, OGG Opus and µ-law, at 8,000 to 44,100 Hz.

Rules and limits

  • sample_rate: 8000, 16000, 22050, 24000, 44100 or 48000. Default 48000.
  • Other fields: num_channels (default 1) and sample_width in bytes (default 2). encoding is not needed for mp3.
  • Equivalent settings: container: "raw" with encoding: "pcm_mulaw" is the same as container: "mulaw"; with pcm_alaw, the same as alaw; encoding: "oggopus" with raw or ogg is the same as container: "ogg".

Things to watch for

  • A low MP3 bitrate lowers the sample rate. With bitrate: "32k", requests for 24,000 and 48,000 Hz both returned 22,050 Hz files; 16,000 Hz was kept, and 24,000 Hz was kept at 128k. Read the sample rate from the file, not from your request. Other bitrates: TBC.
  • µ-law and A-law are always 8 kHz and have no header. Most telephony platforms expect exactly this; to play one on a computer, decode it or wrap it in a WAV header first.
  • raw has no header either. Keep the sample_rate you asked for: a player needs it to play the audio at the right speed.
  • OGG Opus plays at 48 kHz. The file records the rate you asked for, but Opus players decode at 48 kHz. This is normal for Opus.
  • Higher is not always better. A narrowband phone line carries 8 kHz audio however high the rate you request; ask for what the destination plays.
  • Python SDK: AudioConfig defaults to a 48 kHz WAV. The SDK checks container, sample_rate and bitrate before sending.

Phone audio (Speech-to-Text)

The other side of the call: transcribing 8 kHz audio.

Streaming (SSE)

Start playback before the whole audio is ready.

Text-to-Speech (REST)

Every request field, with a request builder.

Limits

Text length, formats and rate limits.
Last modified on December 2, 2026