curl --location 'https://api.myvocal.ai/sound_clone/api/v1/tts/stream' \
--header 'accessKey: <your_api_key>' \
--header 'Content-Type: application/json' \
--data '{
"voiceId": "<voice_id>",
"title": "tts-stream-default",
"text": "Hello from MyVocal streaming endpoint.",
"language": "en",
"voiceSettings": {
"stability": 0.7
}
}' \
--output output-default.mp3
curl --location 'https://api.myvocal.ai/sound_clone/api/v1/tts/stream' \
--header 'accessKey: <your_api_key>' \
--header 'Content-Type: application/json' \
--data '{
"voiceId": "<voice_id>",
"title": "tts-stream-v3-explicit-language",
"text": "[happy] Hola, this is a short V3 streaming test.",
"language": "en",
"modelId": "myvocal_v3",
"voiceSettings": {
"stability": 0.5
}
}' \
--output output-v3-explicit.mp3
curl --location 'https://api.myvocal.ai/sound_clone/api/v1/tts/stream' \
--header 'accessKey: <your_api_key>' \
--header 'Content-Type: application/json' \
--data '{
"voiceId": "<voice_id>",
"title": "tts-stream-v3-auto-detect",
"text": "[happy] Hola, este es un test para auto detect.",
"modelId": "myvocal_v3",
"voiceSettings": {
"stability": 0.5
}
}' \
--output output-v3-auto.mp3
audio/mpeg stream (binary)
{
"code": 10004,
"message": "Invalid language option.",
"data": null
}
Text-to-Speech
Text-to-Speech Streaming
Create text-to-speech audio and return streaming audio response.
POST
/
sound_clone
/
api
/
v1
/
tts
/
stream
curl --location 'https://api.myvocal.ai/sound_clone/api/v1/tts/stream' \
--header 'accessKey: <your_api_key>' \
--header 'Content-Type: application/json' \
--data '{
"voiceId": "<voice_id>",
"title": "tts-stream-default",
"text": "Hello from MyVocal streaming endpoint.",
"language": "en",
"voiceSettings": {
"stability": 0.7
}
}' \
--output output-default.mp3
curl --location 'https://api.myvocal.ai/sound_clone/api/v1/tts/stream' \
--header 'accessKey: <your_api_key>' \
--header 'Content-Type: application/json' \
--data '{
"voiceId": "<voice_id>",
"title": "tts-stream-v3-explicit-language",
"text": "[happy] Hola, this is a short V3 streaming test.",
"language": "en",
"modelId": "myvocal_v3",
"voiceSettings": {
"stability": 0.5
}
}' \
--output output-v3-explicit.mp3
curl --location 'https://api.myvocal.ai/sound_clone/api/v1/tts/stream' \
--header 'accessKey: <your_api_key>' \
--header 'Content-Type: application/json' \
--data '{
"voiceId": "<voice_id>",
"title": "tts-stream-v3-auto-detect",
"text": "[happy] Hola, este es un test para auto detect.",
"modelId": "myvocal_v3",
"voiceSettings": {
"stability": 0.5
}
}' \
--output output-v3-auto.mp3
audio/mpeg stream (binary)
{
"code": 10004,
"message": "Invalid language option.",
"data": null
}
Header
string
required
API key for authentication.
Body
string
required
Voice ID returned by
GET /sound_clone/api/v1/voices.string
Optional title for the generated record.
string
required
Text to synthesize.
string
Language selector.
Default/V2 path: required and must use existing mapped language values.
myvocal_v3: optional. If provided, it is forwarded to upstream as language. If omitted, upstream auto-detect is used.See supported V3 codes in V3 Language Codes (98 languages).
string
Optional explicit model selector.
Omit it to use the default model path.
Set
myvocal_v3 to request the V3 path.object
For advanced settings, use suggested values unless you have strong tuning needs.
Show Toggle object
Show Toggle object
number
default:"0.7"
a decimal between 0 and 1, in increments of 0.1, with a recommended default value of 0.7.
When your parameters are set lower, the emotional variation of the TTS audio will be more abundant. Even for the same text, the effects generated multiple times will be different. You can choose the most suitable one by generating the same text’s TTS audio multiple times.
When your parameters are set higher, the emotion of the TTS audio will tend to be consistent.
For
myvocal_v3, the currently publicly documented stability values are:
-
0.5: natural pronunciation, closer to normal human speech.-
1: more stable output with less variation.Prompt Control (myvocal_v3)
Reference capability source: v3.myvocal.ai. Use
[tag] in text to guide style and delivery.[tag] Your text content
[happy] Hello everyone, welcome to MyVocal.
[laughter] That was funny.
- Emotion control:
happy,excited,sad,angry,surprised - Non-speech sounds:
laughter,throat clearing,yawning,shushing,screaming - Sound-related effects:
breathing,sighing,gasping,crying,murmuring
Response
string
Success usually returns
audio/mpeg.stream
Binary audio stream payload.
curl --location 'https://api.myvocal.ai/sound_clone/api/v1/tts/stream' \
--header 'accessKey: <your_api_key>' \
--header 'Content-Type: application/json' \
--data '{
"voiceId": "<voice_id>",
"title": "tts-stream-default",
"text": "Hello from MyVocal streaming endpoint.",
"language": "en",
"voiceSettings": {
"stability": 0.7
}
}' \
--output output-default.mp3
curl --location 'https://api.myvocal.ai/sound_clone/api/v1/tts/stream' \
--header 'accessKey: <your_api_key>' \
--header 'Content-Type: application/json' \
--data '{
"voiceId": "<voice_id>",
"title": "tts-stream-v3-explicit-language",
"text": "[happy] Hola, this is a short V3 streaming test.",
"language": "en",
"modelId": "myvocal_v3",
"voiceSettings": {
"stability": 0.5
}
}' \
--output output-v3-explicit.mp3
curl --location 'https://api.myvocal.ai/sound_clone/api/v1/tts/stream' \
--header 'accessKey: <your_api_key>' \
--header 'Content-Type: application/json' \
--data '{
"voiceId": "<voice_id>",
"title": "tts-stream-v3-auto-detect",
"text": "[happy] Hola, este es un test para auto detect.",
"modelId": "myvocal_v3",
"voiceSettings": {
"stability": 0.5
}
}' \
--output output-v3-auto.mp3
audio/mpeg stream (binary)
{
"code": 10004,
"message": "Invalid language option.",
"data": null
}
Common errors
Invalid language option.: non-V3/default path is missing or using an unsupportedlanguagevalue.VOICE_NOT_FOUND:voiceIdis invalid or not available under this API key.code = -1: upstream or backend failed to complete generation.
