textToSpeech

Synchronous text-to-speech synthesis

Changed on

Generate speech synchronously from text or SSML. Returns complete audio as base64. The model associated with the voice is selected automatically.

post/synthesize

Request

  • Base URL: https://app.resemble.ai/api/v2
  • URL: https://app.resemble.ai/api/v2/synthesize
  • Auth: HTTP bearer

Request body

voice_uuidstring required

Voice UUID to use for synthesis

project_uuidstring

Optional project UUID to store the clip

titlestring

Optional title for the generated clip

datastring required

Text or SSML to synthesize (max 3,000 characters)

precision'MULAW' | 'PCM_16' | 'PCM_24' | 'PCM_32'

Audio precision for WAV output

output_format'wav' | 'mp3'

Audio output format

sample_rate'8000' | '16000' | '22050' | '32000' | '44100' | '48000'

Audio sample rate in Hz

use_hdboolean

Enable HD synthesis with small latency trade-off

apply_custom_pronunciationsboolean

When true, automatically applies your team's custom pronunciations to matching words in the input text. Defaults to false.

Response

Successful synthesis

successboolean
audio_contentstring byte

Base64-encoded audio bytes

durationnumber double

Audio duration in seconds

synth_durationnumber double

Raw synthesis time

output_formatstring
sample_rateinteger
titlestring
issuesstring[]

Changes

    • warning

      deleted the header request parameter Authorization

    • info

      the endpoint scheme security BearerAuth was added to the API

    • info

      api operation id synthesize removed and replaced with textToSpeech_synthesize