Text to Audio API is a powerful transformer-based model that turns text into audio. It can produce realistic, multilingual speech, background noise, and simple sound effects. This API also handles nonverbal cues like laughing, sighing, and crying, making it versatile for various audio applications.
Usage Example:
To generate audio, provide a text prompt along with other parameter like speaker which you want to use . We have over 130+ types of speaker voice that you can call and generate the audio. The model outputs a URL to the generated audio.
API Details:
Text: The main text input for generating audio.
speaker: Select the speaker voice.
language: The resulted audio language
cleanup_voice: Whether to clean up the voice output
Examples
Request and Response
"speaker": "announcer"
Request
curl-X'POST' \'https://api.magicapi.dev/api/v1/bridgeml/text-to-audio/text-to-audio' \-H'accept: application/json' \-H'x-magicapi-key: API_KEY' \-H'Content-Type: multipart/form-data' \ -F 'text=Greetings, everyone! Today, I want to talk about the importance of resilience. In our fast-paced world, change is constant, and challenges are inevitable. Resilience is the ability to bounce back, adapt, and grow stronger in the face of adversity. It'\''s not just about enduring hardships but thriving through them. We see resilience in nature, where plants thrive after storms, and in people who overcome personal and professional obstacles. It'\''s a skill that can be cultivated through mindfulness, perseverance, and a positive mindset. By embracing challenges as opportunities for growth, we can transform setbacks into stepping stones. Remember, every difficulty faced is a chance to develop resilience. As we move forward, let'\''s support each other in building this invaluable trait, for it'\''s resilience that enables us to navigate life'\''s uncertainties and achieve our fullest potential. Together, we can create a community that not only survives but thrives. Thank you!' \
-F'speaker=announcer' \-F'language=en' \-F'cleanup_voice=false'
curl-X'POST' \'https://api.magicapi.dev/api/v1/bridgeml/text-to-audio/text-to-audio' \-H'accept: application/json' \-H'x-magicapi-key: API_KEY' \-H'Content-Type: multipart/form-data' \ -F 'text=Greetings, everyone! Today, I want to talk about the importance of resilience. In our fast-paced world, change is constant, and challenges are inevitable. Resilience is the ability to bounce back, adapt, and grow stronger in the face of adversity. It'\''s not just about enduring hardships but thriving through them. We see resilience in nature, where plants thrive after storms, and in people who overcome personal and professional obstacles. It'\''s a skill that can be cultivated through mindfulness, perseverance, and a positive mindset. By embracing challenges as opportunities for growth, we can transform setbacks into stepping stones. Remember, every difficulty faced is a chance to develop resilience. As we move forward, let'\''s support each other in building this invaluable trait, for it'\''s resilience that enables us to navigate life'\''s uncertainties and achieve our fullest potential. Together, we can create a community that not only survives but thrives. Thank you!' \
-F'speaker=de_speaker_9' \-F'language=en' \-F'cleanup_voice=false'
curl-X'POST' \'https://api.magicapi.dev/api/v1/bridgeml/text-to-audio/text-to-audio' \-H'accept: application/json' \-H'x-magicapi-key: API_KEY' \-H'Content-Type: multipart/form-data' \ -F 'text=Greetings, everyone! Today, I want to talk about the importance of resilience. In our fast-paced world, change is constant, and challenges are inevitable. Resilience is the ability to bounce back, adapt, and grow stronger in the face of adversity. It'\''s not just about enduring hardships but thriving through them. We see resilience in nature, where plants thrive after storms, and in people who overcome personal and professional obstacles. It'\''s a skill that can be cultivated through mindfulness, perseverance, and a positive mindset. By embracing challenges as opportunities for growth, we can transform setbacks into stepping stones. Remember, every difficulty faced is a chance to develop resilience. As we move forward, let'\''s support each other in building this invaluable trait, for it'\''s resilience that enables us to navigate life'\''s uncertainties and achieve our fullest potential. Together, we can create a community that not only survives but thrives. Thank you!' \
-F'speaker=es_speaker_9' \-F'language=en' \-F'cleanup_voice=false'
curl-X'POST' \'https://api.magicapi.dev/api/v1/bridgeml/text-to-audio/text-to-audio' \-H'accept: application/json' \-H'x-magicapi-key: API_KEY' \-H'Content-Type: multipart/form-data' \ -F 'text=Greetings, everyone! Today, I want to talk about the importance of resilience. In our fast-paced world, change is constant, and challenges are inevitable. Resilience is the ability to bounce back, adapt, and grow stronger in the face of adversity. It'\''s not just about enduring hardships but thriving through them. We see resilience in nature, where plants thrive after storms, and in people who overcome personal and professional obstacles. It'\''s a skill that can be cultivated through mindfulness, perseverance, and a positive mindset. By embracing challenges as opportunities for growth, we can transform setbacks into stepping stones. Remember, every difficulty faced is a chance to develop resilience. As we move forward, let'\''s support each other in building this invaluable trait, for it'\''s resilience that enables us to navigate life'\''s uncertainties and achieve our fullest potential. Together, we can create a community that not only survives but thrives. Thank you!' \
-F'speaker=it_speaker_5' \-F'language=en' \-F'cleanup_voice=false'