Skip to main content
POST
Generate and stream TTS audio

Supported languages

Model-specific parameters

seed applies to dd-etts-1.1 only. Newer models — including the default dd-etts-3.0 — do not use it, and setting it has no effect on their output. Do not rely on it to reproduce a generation on any model other than dd-etts-1.1.

Supported output formats

The REST API streams audio as raw bytes in the HTTP response body. Supported formats:
The REST API supports mp3, opus, and mulaw only. For wav or s16le output, use the Streaming Out API.

Sample rates

Valid values are 8000, 16000, 22050, 24000, 32000, 36000, 44100, and 48000 Hz; any other value is rejected with a 400. The internal generation runs at 48 kHz and is resampled to the requested rate. If no sample rate is specified, mulaw defaults to 8000 Hz.

Generation ID

Every successful response carries an x-generation-id header identifying the generation. Keep it — it is what you quote when reporting a problem with the audio.

REST vs WebSocket comparison

Authorizations

x-api-key
string
header
required

API key for authentication. Must start with dd- prefix.

Headers

x-api-key
string
default:dd-00000000000000000000000065c9cbfe
required

API Key

Body

application/json

Request structure for TTS generation endpoints.

Optional parameters (not shown in playground): generationId (string), targetDuration (number, seconds — mutually exclusive with tempo), tempo (number, 0–2 — mutually exclusive with targetDuration), variance (number, 0.0–1.0), temperature (number, 0.0–1.0), sampleRate (integer: 8000, 16000, 22050, 24000, 32000, 36000, 44100 or 48000), format (string: mp3/opus/mulaw — default mp3), promptBoost (boolean), superStretch (boolean), realtime (boolean), cleanAudio (boolean, default false on REST), autoGain (boolean, default true on REST), publish (boolean), accentControl (object with accentBaseLocale, accentLocale, accentRatio), performanceReferencePromptId (string), voiceReference (string, base64-encoded audio), targetGender (string: male/female — used for language-specific handling such as Hebrew diacritics; other values are ignored).

model
string
default:dd-etts-3.0
required

Model ID to use for generation

Example:

"dd-etts-3.0"

targetText
string
required

Text to be converted to speech

Example:

"Hello world, welcome to Deepdub."

locale
string
required

Language locale code (e.g., en-US, fr-FR)

Example:

"en-US"

voicePromptId
string
required

ID of the voice prompt to use for generation

Example:

"bd1b00bb-be1c-4679-8eaa-0fcbfd4ff773"

seed
integer

Random seed for deterministic generation. Applies to dd-etts-1.1 only — newer models do not use it, and setting it has no effect on their output.

Example:

42

Response

Audio stream in the requested format (MP3, Opus, or mulaw depending on format parameter). The response body is raw audio bytes.