Skip to main content
Deepgram's Docs

Search documentation

Type to search this documentation.

Text to Speech transformation

POST/v1/speakText to Speech transformation

Convert text into natural-sounding speech using Deepgram's TTS REST API

Parameters

callbackstringquery

URL to which we'll make the callback request

callback_methodstringquery

HTTP method by which the callback request will be made

one of "POST", "PUT"

one of "POST", "PUT" · default "POST"

mip_opt_outbooleanquery

Opts out requests from the Deepgram Model Improvement Program. Refer to our Docs for pricing impacts before setting this to true. https://dpgr.am/deepgram-mip

default false

tagvaluequery

Label your requests for the purpose of identification during usage reporting

oneOf · 2 options
Option 1string
Option 2array of string
bit_ratevaluequery

The bitrate of the audio in bits per second. Choose from predefined ranges or specific values based on the encoding type.

oneOf · 3 options
Option 1stringV1SpeakPostParametersBitRate0

V1SpeakPostParametersBitRate0

Encoding - mp3(default). Supported bitrates - 32000, 48000(default) bps.

one of "32000", "48000"

Option 2number · double

maximum 650000 · minimum 4000

Option 3number · double

maximum 192000 · minimum 4000

containervaluequery

Container specifies the file format wrapper for the output audio. The available options depend on the encoding type.

oneOf · 5 options
Option 1stringV1SpeakPostParametersContainer0

V1SpeakPostParametersContainer0

No container.

one of "none"

Option 2stringV1SpeakPostParametersContainer1

V1SpeakPostParametersContainer1

Encoding - linear16. Supported container - wav (default), or no container.

one of "wav"

Option 3stringV1SpeakPostParametersContainer2

V1SpeakPostParametersContainer2

Encoding - mulaw. Supported container - wav (default), or no container.

one of "wav"

Option 4stringV1SpeakPostParametersContainer3

V1SpeakPostParametersContainer3

Encoding - alaw. Supported container - wav (default), or no container.

one of "wav"

Option 5stringV1SpeakPostParametersContainer4

V1SpeakPostParametersContainer4

Encoding - opus. Supported container - ogg (default).

one of "ogg"

encodingvaluequery

Encoding allows you to specify the expected encoding of your audio output

oneOf · 7 options
Option 1stringV1SpeakPostParametersEncoding0

V1SpeakPostParametersEncoding0

Encoding - linear16. Uncompressed, high-quality audio format often used for telephony or audio processing.

one of "linear16"

Option 2stringV1SpeakPostParametersEncoding1

V1SpeakPostParametersEncoding1

Encoding - flac. Lossless audio format for high-quality compression.

one of "flac"

Option 3stringV1SpeakPostParametersEncoding2

V1SpeakPostParametersEncoding2

Encoding - mulaw. Compressed audio format commonly used in telephony.

one of "mulaw"

Option 4stringV1SpeakPostParametersEncoding3

V1SpeakPostParametersEncoding3

Encoding - alaw. Similar to mulaw but used in international telephony.

one of "alaw"

Option 5stringV1SpeakPostParametersEncoding4

V1SpeakPostParametersEncoding4

Encoding - mp3. Popular compressed audio format for music and streaming.

one of "mp3"

Option 6stringV1SpeakPostParametersEncoding5

V1SpeakPostParametersEncoding5

Encoding - opus. High-compression audio format optimized for real-time communications.

one of "opus"

Option 7stringV1SpeakPostParametersEncoding6

V1SpeakPostParametersEncoding6

Encoding - aac. Advanced audio format offering better quality at smaller file sizes than mp3.

one of "aac"

modelstringquery

AI model used to process submitted text

one of "aura-angus-en", "aura-arcas-en", "aura-asteria-en", "aura-athena-en", "aura-helios-en", "aura-hera-en", "aura-luna-en", "aura-orion-en", "aura-orpheus-en", "aura-perseus-en", "aura-stella-en", "aura-zeus-en", "aura-2-amalthea-en", "aura-2-andromeda-en", "aura-2-apollo-en", "aura-2-arcas-en", "aura-2-aries-en", "aura-2-asteria-en", "aura-2-athena-en", "aura-2-atlas-en", "aura-2-aurora-en", "aura-2-callista-en", "aura-2-cora-en", "aura-2-cordelia-en", "aura-2-delia-en", "aura-2-draco-en", "aura-2-electra-en", "aura-2-harmonia-en", "aura-2-helena-en", "aura-2-hera-en", "aura-2-hermes-en", "aura-2-hyperion-en", "aura-2-iris-en", "aura-2-janus-en", "aura-2-juno-en", "aura-2-jupiter-en", "aura-2-luna-en", "aura-2-mars-en", "aura-2-minerva-en", "aura-2-neptune-en", "aura-2-odysseus-en", "aura-2-ophelia-en", "aura-2-orion-en", "aura-2-orpheus-en", "aura-2-pandora-en", "aura-2-phoebe-en", "aura-2-pluto-en", "aura-2-saturn-en", "aura-2-selene-en", "aura-2-thalia-en", "aura-2-theia-en", "aura-2-vesta-en", "aura-2-zeus-en", "aura-2-agustina-es", "aura-2-alvaro-es", "aura-2-antonia-es", "aura-2-aquila-es", "aura-2-carina-es", "aura-2-celeste-es", "aura-2-diana-es", "aura-2-estrella-es", "aura-2-gloria-es", "aura-2-javier-es", "aura-2-luciano-es", "aura-2-nestor-es", "aura-2-olivia-es", "aura-2-selena-es", "aura-2-silvia-es", "aura-2-sirio-es", "aura-2-valerio-es", "aura-2-aurelia-de", "aura-2-elara-de", "aura-2-fabian-de", "aura-2-julius-de", "aura-2-kara-de", "aura-2-lara-de", "aura-2-viktoria-de", "aura-2-beatrix-nl", "aura-2-cornelia-nl", "aura-2-daphne-nl", "aura-2-hestia-nl", "aura-2-lars-nl", "aura-2-leda-nl", "aura-2-rhea-nl", "aura-2-roman-nl", "aura-2-sander-nl", "aura-2-agathe-fr", "aura-2-hector-fr", "aura-2-cesare-it", "aura-2-cinzia-it", "aura-2-demetra-it", "aura-2-dionisio-it", "aura-2-elio-it", "aura-2-flavio-it", "aura-2-livia-it", "aura-2-maia-it", "aura-2-melia-it", "aura-2-ama-ja", "aura-2-ebisu-ja", "aura-2-fujin-ja", "aura-2-izanami-ja", "aura-2-uzume-ja"

one of "aura-angus-en", "aura-arcas-en", "aura-asteria-en", "aura-athena-en", "aura-helios-en", "aura-hera-en", "aura-luna-en", "aura-orion-en", "aura-orpheus-en", "aura-perseus-en", "aura-stella-en", "aura-zeus-en", "aura-2-amalthea-en", "aura-2-andromeda-en", "aura-2-apollo-en", "aura-2-arcas-en", "aura-2-aries-en", "aura-2-asteria-en", "aura-2-athena-en", "aura-2-atlas-en", "aura-2-aurora-en", "aura-2-callista-en", "aura-2-cora-en", "aura-2-cordelia-en", "aura-2-delia-en", "aura-2-draco-en", "aura-2-electra-en", "aura-2-harmonia-en", "aura-2-helena-en", "aura-2-hera-en", "aura-2-hermes-en", "aura-2-hyperion-en", "aura-2-iris-en", "aura-2-janus-en", "aura-2-juno-en", "aura-2-jupiter-en", "aura-2-luna-en", "aura-2-mars-en", "aura-2-minerva-en", "aura-2-neptune-en", "aura-2-odysseus-en", "aura-2-ophelia-en", "aura-2-orion-en", "aura-2-orpheus-en", "aura-2-pandora-en", "aura-2-phoebe-en", "aura-2-pluto-en", "aura-2-saturn-en", "aura-2-selene-en", "aura-2-thalia-en", "aura-2-theia-en", "aura-2-vesta-en", "aura-2-zeus-en", "aura-2-agustina-es", "aura-2-alvaro-es", "aura-2-antonia-es", "aura-2-aquila-es", "aura-2-carina-es", "aura-2-celeste-es", "aura-2-diana-es", "aura-2-estrella-es", "aura-2-gloria-es", "aura-2-javier-es", "aura-2-luciano-es", "aura-2-nestor-es", "aura-2-olivia-es", "aura-2-selena-es", "aura-2-silvia-es", "aura-2-sirio-es", "aura-2-valerio-es", "aura-2-aurelia-de", "aura-2-elara-de", "aura-2-fabian-de", "aura-2-julius-de", "aura-2-kara-de", "aura-2-lara-de", "aura-2-viktoria-de", "aura-2-beatrix-nl", "aura-2-cornelia-nl", "aura-2-daphne-nl", "aura-2-hestia-nl", "aura-2-lars-nl", "aura-2-leda-nl", "aura-2-rhea-nl", "aura-2-roman-nl", "aura-2-sander-nl", "aura-2-agathe-fr", "aura-2-hector-fr", "aura-2-cesare-it", "aura-2-cinzia-it", "aura-2-demetra-it", "aura-2-dionisio-it", "aura-2-elio-it", "aura-2-flavio-it", "aura-2-livia-it", "aura-2-maia-it", "aura-2-melia-it", "aura-2-ama-ja", "aura-2-ebisu-ja", "aura-2-fujin-ja", "aura-2-izanami-ja", "aura-2-uzume-ja" · default "aura-asteria-en"

sample_ratevaluequery

Sample Rate specifies the sample rate for the output audio. Based on the encoding, different sample rates are supported. For some encodings, the sample rate is not configurable

oneOf · 5 options
Option 1stringV1SpeakPostParametersSampleRate0

V1SpeakPostParametersSampleRate0

Encoding - linear16. Supported sample rates - 8000, 16000, 24000, 32000, 48000 Hz.

one of "8000", "16000", "24000", "32000", "48000"

Option 2stringV1SpeakPostParametersSampleRate1

V1SpeakPostParametersSampleRate1

Encoding - mulaw. Supported sample rates - 8000, 16000 Hz.

one of "8000", "16000"

Option 3stringV1SpeakPostParametersSampleRate2

V1SpeakPostParametersSampleRate2

Encoding - alaw. Supported sample rates - 8000, 16000 Hz.

one of "8000", "16000"

Option 4stringV1SpeakPostParametersSampleRate3

V1SpeakPostParametersSampleRate3

Encoding - mp3. Sample rate is fixed and not configurable (22050 Hz).

one of "22050"

Option 5stringV1SpeakPostParametersSampleRate4

V1SpeakPostParametersSampleRate4

Encoding - opus. Sample rate is fixed at 48000 Hz.

one of "48000"

speednumber · doublequery

Speaking rate multiplier that adjusts the pace of generated speech while preserving natural prosody and voice quality. Not yet supported in all languages.

default 1 · maximum 1.5 · minimum 0.7

Request body

Transform text to speech

application/json
objectSpeakV1Request

SpeakV1Request

Request body for text-to-speech conversion

textstringrequired

The text content to be converted to speech

Example request
{
  "text": "string"
}

Responses

200Successful text-to-speech transformationapplication/json
objectspeak_v1_audio_generate_Response_200

speak_v1_audio_generate_Response_200

Empty response body

Example response
{}
400Invalid Requestapplication/json
valueErrorResponse

ErrorResponse

oneOf · 3 options
Option 1stringErrorResponseTextError

ErrorResponseTextError

Option 2objectErrorResponseLegacyError

ErrorResponseLegacyError

err_codestring

The error code

err_msgstring

The error message

request_idstring

The request ID

Option 3objectErrorResponseModernError

ErrorResponseModernError

categorystring

The category of the error

detailsstring

A description of the error

messagestring

A message about the error

request_idstring

The unique identifier of the request

Example response
{
  "err_code": "string",
  "err_msg": "string",
  "request_id": "string"
}
Documentation menu