The Text-to-Speech (TTS) API offers an easy-to-use solution for converting text into lifelike audio. Whether you need to add a human touch to your app, create engaging content, or build accessibility features, this API provides a seamless way to generate high-quality voice output. With a variety of voice models and languages, you can tailor the audio experience to your specific needs.
This API features straightforward endpoints to list available models and languages and to perform TTS conversions. Simply send a request with the desired text and parameters, and receive a realistic audio file in response. The flexibility and affordability of this API make it an ideal choice for developers looking to enhance their projects with natural-sounding speech.
Endpoints
GET /models/list Retrieve list of available TTS models
GET /languages/list Retrieve list of available languages
curl-X'POST' \'https://api.magicapi.dev/api/v1/text-to-speech/text-to-speech/tts/run' \-H'accept: audio/wav' \-H'x-magicapi-key: API_KEY' \-H'Content-Type: application/json' \-d'{ "speaker_id": 1, "lang": "en", "text_data": "Hi, this is the text that I want to transform into speech."}'
Just paste the curl request in the Postman or terminal to receive the response result of the request.