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 service is located 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 be converted into speech. You can only use one text and ssml field.To control pronunciation (pause, emphasis, and stress), use TTS markup. Maximum string length: 5,000 characters. |
ssml | string Text in SSML format to be converted into speech. You can only use one text and ssml fields. |
lang | string Language. Acceptable values: ru-RU (default): Russian. |
voice | string Preferred speech synthesis voice from the list. |
emotion | string Voice mode or emotional tone. Supported only for Russian ( ru-RU ). See List of voices for acceptable voice/emotional tone combinations. |
speed | string The rate (speed) of synthesized speech. The rate of speech is set as a decimal number in the range from 0.1 to 3.0 . Where:
|
format | string The format of the synthesized audio. Acceptable values:
|
sampleRateHertz | string The sampling frequency of the synthesized audio. Used if format is set to lpcm . Acceptable values include:
|
folderId | string ID of the folder that you have access to. It is required for authorization with a user account (see Authentication with the SpeechKit API). 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.