Skip to main content
POST
/
tts
/
retroactive
Generate TTS audio retroactively
curl --request POST \
  --url https://restapi.deepdub.ai/api/v1/tts/retroactive \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <x-api-key>' \
  --data '
{
  "locale": "en-US",
  "model": "dd-etts-1.1",
  "targetText": "Hello world",
  "voicePromptId": "vp_12345abcde",
  "accentControl": {
    "accentBaseLocale": "en-US",
    "accentLocale": "en-GB",
    "accentRatio": 0.5
  },
  "generationId": "gen_67890fghij",
  "performanceReferencePromptId": "perf_12345",
  "promptBoost": true,
  "publish": true,
  "realtime": false,
  "sampleRate": 44100,
  "seed": 42,
  "superStretch": true,
  "targetDuration": 10.5,
  "temperature": 0.7,
  "tempo": 1.2,
  "variance": 0.8,
  "voiceReference": "base64_encoded_audio_data"
}
'
{
  "url": "<string>"
}

Headers

x-api-key
string
required

API Key

Body

application/json

TTS generation request

Request structure for TTS and voice generation endpoints

locale
string
required

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

Example:

"en-US"

model
string
required

Model ID to use for generation Model ID to use for generation (required)

Example:

"dd-etts-1.1"

targetText
string
required

Text to be converted to speech

Example:

"Hello world"

voicePromptId
string
required

ID of the voice prompt to use

Example:

"vp_12345abcde"

accentControl
object

Optional accent control parameters

generationId
string

Optional ID for the generation

Example:

"gen_67890fghij"

performanceReferencePromptId
string

ID of performance reference prompt (optional)

Example:

"perf_12345"

promptBoost
boolean

Enhance voice prompt characteristics (optional)

Example:

true

publish
boolean

Whether to publish the generated audio (optional)

Example:

true

realtime
boolean

Enable real-time processing mode (optional)

Example:

false

sampleRate
integer

Output audio sample rate in Hz (optional)

Example:

44100

seed
integer

Random seed for deterministic generation (optional)

Example:

42

superStretch
boolean

Enable super stretch mode for longer audio (optional)

Example:

true

targetDuration
number

Target duration for the generated audio in seconds (optional)

Example:

10.5

temperature
number

Generation temperature (0.0-1.0) (optional)

Example:

0.7

tempo
number

Playback speed multiplier (0.5-2.0) (optional)

Example:

1.2

variance
number

Voice variation level (0.0-1.0) (optional)

Example:

0.8

voiceReference
string

Base64-encoded audio reference for voice cloning (optional)

Example:

"base64_encoded_audio_data"

Response

Successful response with URL

url
string