Text-to-Speech
Text-to-Speech Streaming
Generate a text-to-speech audio using a voice of your choice and returns audio stream.(❗❗❗File-related interfaces are not supported, please use interface tools for requests.)
POST
/
sound_clone
/
api
/
v1
/
tts
/
stream
Header
Body
curl --location 'https://api.myvocal.ai/sound_clone/api/v1/tts/stream' \
--header 'accessKey: xxx' \
--header 'Content-Type: application/json' \
--data '{
"voiceId": "7813",
"title": "female",
"text": "Generate a text-to-speech audio using a voice of your choice and returns audio stream.",
"language": "original_english",
"voiceSettings":{
"stability":0.7
}
}'
This response is stream.
Header
accessKey
string
requiredYou can copy your api-key on https://www.myvocal.ai/profile after you have subscribed to Pro or Business Plan.
Body
voiceId
string
Your voiceId
title
string
Please do not exceed 32 characters in length. If this parameter is null, it will all default to “Untitled_TTS”
text
string
The maximum number of characters you can input at once depends on the benefits of your subscription plan.
language
string
Please select form:
us_english
original_english : Generate english tts in the same accent as the audio you uploaded.
spanish
portuguese
german
french
arabic
voiceSettings
object
For some advanced settings, it is generally recommended to use the suggested parameters.
Response
Header
Content-Type
string
If the request is successful, this value in the callback is audio/mpeg.
This response is stream.
curl --location 'https://api.myvocal.ai/sound_clone/api/v1/tts/stream' \
--header 'accessKey: xxx' \
--header 'Content-Type: application/json' \
--data '{
"voiceId": "7813",
"title": "female",
"text": "Generate a text-to-speech audio using a voice of your choice and returns audio stream.",
"language": "original_english",
"voiceSettings":{
"stability":0.7
}
}'
This response is stream.