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:

1{
2 "audio_content": "... base64 ...",
3 "audio_timestamps": {
4 "graph_chars": [],
5 "graph_times": [],
6 "phon_chars": [],
7 "phon_times": []
8 },
9 "duration": 1.84,
10 "output_format": "wav",
11 "sample_rate": 48000,
12 "success": true
13}

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

Next Steps