For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Status
OverviewProductsManageAPI ReferenceTutorialsClient Libraries
OverviewProductsManageAPI ReferenceTutorialsClient Libraries
    • Overview
  • Quickstarts
    • Synthesize Your First Clip
    • Prompted Synthesis
  • Voice Creation
    • Voice Design Guide
  • WebSocket Streaming
    • Getting Started
    • Receiving Audio Data
    • Python Example
    • Error Handling
  • Prompt Engineering
    • Voice Design Prompting
    • SSML Prompts
Status
LogoLogo
On this page
  • Next Steps
Prompt Engineering

Generate Audio

Was this page helpful?
Previous
Built with

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

  • Try alternative prompts to explore different deliveries.
  • Pair prompts with custom voices from Voice Design.
  • Review the Text-to-Speech reference for additional parameters.