Synchronous recognition API
With the synchronous recognition API, you can transcribe prepared audio files with the following characteristics:
- Maximum file size: 1 MB
- Maximum length: 30 seconds
- Maximum number of audio channels: 1
The synchronous recognition service is located at stt.api.cloud.yandex.net/speech/v1/stt:recognize.
Query parameters
| Parameter | Description |
|---|---|
| lang | string Recognition language. See the model description for valid values. The default value is ru-RU, Russian. |
| topic | string Language model to use for recognition. The more accurate your choice of the model, the better the recognition result. You can only specify one model per request. Valid values depend on the selected language. The default value is general. |
| profanityFilter | boolean This parameter controls the profanity filter in recognized speech. Valid values:
|
| rawResults | boolean Flag that toggles spelling out numbers: true for words, false (default) for figures. |
| format | string Audio format. Valid values:
|
| sampleRateHertz | string Audio sampling frequency. Used if format equals lpcm. Valid values:
|
| folderId | string ID of the folder you have access to. 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. |
Request body parameters
Provide the binary data of an audio file in the request body.
Response
The recognized text is returned in the result field of the response.
{
"result": <recognized_text>
}
For more on response format and codes, see Response status codes.
Use cases
Folder: Space containing the Yandex Cloud resources. To authenticate to AI Studio, you need a folder ID. To get it, in the AI Studio interface, hover over the folder name at the top of the screen and click . The ID will be copied to the clipboard.
