API v1 method description
Generates (synthesizes) speech from received text.
Note
API v1 does not support all SpeechKit synthesis options. For a comparison of API versions, see Synthesis options.
The synthesis suite is available at: tts.api.cloud.yandex.net/speech/v1/tts:synthesize
Parameters in the request body
All parameters must be URL-encoded
Parameter | Description |
---|---|
text | string UTF-8 encoded text to convert to speech. You can use only one of the fields: text or ssml .To control pronunciation (pause, emphasis, and stress), use TTS markup. Maximum string length: 5,000 characters. |
ssml | string SSML text to convert to speech. You can use only one of the fields: text or ssml . |
lang | string Language. Acceptable values: ru-RU (default), Russian. |
voice | string Preferred speech synthesis voice from the list. |
emotion | string Role or emotional tone of the voice. Supported only for Russian ( ru-RU ). See List of voices for acceptable voice/emotional tone combinations. |
speed | string Synthesized speech rate. The rate of speech is set as a decimal number in the range from 0.1 to 3.0 . Where:
|
format | string Synthesized audio format. Acceptable values:
|
sampleRateHertz | string Synthesized audio sampling frequency. Applies if format equals lpcm . Acceptable values:
|
folderId | string ID of the folder you have access to. Required for authorization with a user account (see Authentication with the SpeechKit API resource). Do not use this field if you make a request on behalf of a service account. The maximum string length is 50 characters. |
Response
If the synthesis was successful, the response will contain the audio file binary content. The output data format depends on the value of the format
parameter.
For more information about the response format and codes, see Response format.