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
curl --location 'https://api.myvocal.ai/sound_clone/api/v1/tts/stream' \
--header 'accessKey: <your_api_key>' \
--header 'Content-Type: application/json' \
--data '{
"voiceId": "<accent_voice_id>",
"text": "Hello from the Accent model.",
"modelId": "myvocal_v3_accent_enhance"
}' \
--output output-accent.mp3
audio/mpeg stream (binary)
{
"code": 10004,
"message": "Invalid language option.",
"data": null
}
TTS API reference
Stream speech
Synthesize text and return the audio as a streaming 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
curl --location 'https://api.myvocal.ai/sound_clone/api/v1/tts/stream' \
--header 'accessKey: <your_api_key>' \
--header 'Content-Type: application/json' \
--data '{
"voiceId": "<accent_voice_id>",
"text": "Hello from the Accent model.",
"modelId": "myvocal_v3_accent_enhance"
}' \
--output output-accent.mp3
audio/mpeg stream (binary)
{
"code": 10004,
"message": "Invalid language option.",
"data": null
}
Text to Speech · Workflow: TTS quickstart · Models: TTS Models & Migration
Basic syntax:
Examples:
Representative categories:
Header
string
required
Your API key. See Authentication.
Body
string
required
Voice ID returned by
GET /sound_clone/api/v1/voices.
For
myvocal_v3_accent_enhance, use a voice returned by GET /sound_clone/api/v1/voices?modelId=myvocal_v3_accent_enhance.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).
myvocal_v3_accent_enhance: optional. Omit it (or send auto) for automatic detection. The Accent model has its own code set (40 language codes plus auto); see TTS Models & Migration. A plain V3 code the Accent model does not support (for example hmn) is rejected with code = 10004. Legacy mapped enum values such as US_ENGLISH are not Accent codes; use en.string
Optional explicit model selector.
Omit it to use the default model path.
Set
myvocal_v3 to request the V3 path.Set
myvocal_v3_accent_enhance to request the Accent model path.When the Accent model is requested but its execution path is unavailable, the response is the standard generation error envelope (
code = 10003). The request is never silently served by a different model.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 in the range
0.1 to 1 inclusive, with a recommended default value of 0.7. Values below 0.1 or above 1 are rejected; no fixed step is enforced.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.
Accent model note: a value inside the normal legal range (
0.1 to 1) is accepted for compatibility but has no effect on myvocal_v3_accent_enhance. An out-of-range value is still rejected with code = 10006.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.For
myvocal_v3_accent_enhance, plain text is the supported minimal path. The inline [tag] prompt control documented for myvocal_v3 is not documented as equivalent, and the service does not rewrite your text. Send plain text for the Accent model.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.
An HTTP
200 does not by itself mean the request succeeded. Read Content-Type before trusting the body:audio/*(normallyaudio/mpeg): the audio payload described above.- any JSON content type: the standard result envelope with a non-success
code(see Common errors below).
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
curl --location 'https://api.myvocal.ai/sound_clone/api/v1/tts/stream' \
--header 'accessKey: <your_api_key>' \
--header 'Content-Type: application/json' \
--data '{
"voiceId": "<accent_voice_id>",
"text": "Hello from the Accent model.",
"modelId": "myvocal_v3_accent_enhance"
}' \
--output output-accent.mp3
audio/mpeg stream (binary)
{
"code": 10004,
"message": "Invalid language option.",
"data": null
}
Common errors
Invalid language option.(code = 10004): non-V3/default path is missing or using an unsupportedlanguagevalue; or the Accent model received a code outside its own language list.VOICE_NOT_FOUND(code = 10005):voiceIdis invalid or not available under this API key.Invalid stability option.(code = 10006):voiceSettings.stabilityis outside the legal range.code = 10003: the Accent model path was requested but its execution path is unavailable. The request is not silently served by another model.code = -1: upstream or backend failed to complete generation.
