Skip to main content
POST
/
voice
Upload a voice sample
curl --request POST \
  --url https://restapi.deepdub.ai/api/v1/voice \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "filename": "voice_sample.wav",
  "data": "<string>"
}
'
{
  "response": {
    "voice_prompt_id": "vp_12345abcde"
  }
}

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

Voice upload request. Audio data must be base64-encoded and not exceed 20 MB.

Request to upload a voice sample and create a voice prompt

filename
string
required

Name of the audio file being uploaded

Example:

"voice_sample.wav"

data
string
required

Base64-encoded audio data

title
string

Title for the voice prompt

Example:

"Professional Narrator"

text
string

Transcript of the spoken text in the audio sample

Example:

"This is a sample recording for voice cloning."

locale
string

Language locale code of the voice sample

Example:

"en-US"

gender
enum<string>

Gender of the speaker

Available options:
MALE,
FEMALE,
NON_BINARY
Example:

"FEMALE"

age
integer

Age of the speaker

Example:

35

speaking_style
string

Speaking style descriptor

Example:

"narrative"

speaker_id
string

Optional external speaker identifier

publish
boolean

Whether to make the voice prompt publicly available

Example:

false

Response

Voice prompt created successfully

response
object

Response after creating or deleting a voice prompt