Skip to navigation

Generate Audio

This example uses the prebuilt voice Ember (voice_uuid = 55592656) and the prompt Speak in an excited, upbeat tone.

curl --request POST 'https://f.cluster.resemble.ai/synthesize' \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-H 'Content-Type: application/json' \
-H 'Accept-Encoding: gzip' \
--data '{
"voice_uuid": "55592656",
"data": "<speak prompt=\"Speak in an excited, upbeat tone\">Hello from Resemble!</speak>",
"sample_rate": 48000,
"output_format": "wav"
}'

Response:

{
"audio_content": "... base64 ...",
"audio_timestamps": {
"graph_chars": [],
"graph_times": [],
"phon_chars": [],
"phon_times": []
},
"duration": 1.84,
"output_format": "wav",
"sample_rate": 48000,
"success": true
}

Decode audio_content or download audio_src (if present) to listen.

Next Steps

  • Try alternative prompts to explore different deliveries.
  • Review the Text-to-Speech reference for additional parameters.