Text To Speech
Synthesize speech from text with voice and gender customization, plus optional webhook callback.
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:
- π Creating dynamic audio narrations or voiceovers
- π§βπΌ Choosing gender-specific voice stylings for different contexts
- π Using webhooks for real-time integration with your workflows
π‘ Endpoint
Use this endpoint to initiate a new text-to-speech audio generation.
βΆοΈ Sample Output
Prompt: When I think of superheroes I think of super humans. I think of Superman, Wolverine and Wonder Woman. Usually they have a cape, or a mask to hide their face just in case. They have X-ray vision and super-human strength. Some can even breathe in outer space. They fly around a while, but always come back to keep our cities safe. Theyβre here to save humanity from itself. Itβs a metaphor for how we look outside ourselves for help, and while the fantasies are fun, I choose to look for me and you.
Download Audioπ§ͺ Try it Yourself
Visit the TextToSpeech Endpoint Explorer to try your own text samples.
π‘ Tip: Set a
webhook_url
to receive results automatically when your audio is ready.
π οΈ Request Parameters
Parameter | Type | Required | Description |
---|---|---|---|
text | String | Yes | The text content to convert to speech |
voice_id | String | Yes | Voice model to apply for synthesis |
gender | String | Yes | Gender of the voice (βmaleβ, βfemaleβ) |
webhook_url | String | No | URL to receive a callback with generated audio |
π₯ Sample Request
π Python
π€ Sample Response
β Success (200 OK)
π Webhook Response
Once audio is ready, your webhook will receive:
π§ Use the
audio_url
to listen or download your synthesized speech.
β Error Codes
- 402 Payment Required: Not enough credits to process the request
- 422 Unprocessable Entity: Invalid or missing fields
- 500 Internal Server Error: Server-side failure during processing
Payload and Request Formation
Authorizations
Body
Response
Successfully initiated TTS conversion
The response is of type object
.