Synthesize speech from text with voice and gender customization, plus optional webhook callback.
Give priority to the sample audio first, then to the voice ID, and lastly to gender.
Convert any given text into realistic speech using your chosen voice and gender. TextToSpeech enables you to instantly bring written content to life. Perfect for:Documentation Index
Fetch the complete documentation index at: https://docs.musicgpt.com/llms.txt
Use this file to discover all available pages before exploring further.
💡 Tip: Set a webhook_url to receive results automatically when your audio is ready.
| Parameter | Type | Required | Description |
|---|---|---|---|
text | String | Yes | The text content to convert to speech |
voice_id | String | Optional | Voice model to apply for synthesis. Either voice_id or sample_audio_url must be provided |
sample_audio_url | String | Optional | URL of Voice you want. Either voice_id or sample_audio_url must be provided |
gender | String | Yes | Gender of the voice (“male”, “female”) |
webhook_url | String | No | URL to receive a callback with generated audio |
💡Note: You must provide eithervoice_idoraudio_url— not both asNone.
content-type: application/json
🎧 Use the audio_url to listen or download your synthesized speech.
Text to convert to speech
An audio URL containing a voice sample of the target speaker without music or overlapping voices. Recommended over voice_id for better output quality.
Voice model ID
Gender preference for the voice (e.g., "male", "female")
Callback URL for async processing