Skip to main content

Speech recognition results

Speech recognition results are added to $request.rawRequest. The data is available in the $request.rawRequest.data field.

Example:

{
"cause": "OK",
"text": "How are you?"
}

Here:

  • cause is the recognition result. Possible values:
    • "OK": the speech was successfully recognized.
    • "NO_INPUT": speech recognition failed.
  • text is the speech text. The field is present if cause is "OK".

User request data

The results may also contain additional user request data received from the ASR provider. Data is available for the following providers:

  • 3iTech
  • Tinkoff VoiceKit
  • Yandex SpeechKit v2
  • Yandex SpeechKit v3

For example, you can get:

  • Hypotheses about user gender in Tinkoff Voicekit.
  • The probability score that an autoresponder speaks instead of the user in Yandex SpeechKit v3.

Data is available in the $request.rawRequest.data.propertiesResponse field. Example:

{
"result": {
"recognition_result": {
"start_time": "0.510s",
"end_time": "2.550s",
"gender_identification_result": {
"male_proba": 0.991876,
"female_proba": 0.008123994
}
},
"is_final": true
}
}

Supported fields

A limited list of fields is supported:

In $request.rawRequest.data.propertiesResponse.results, the following fields are available:

  • chunks:
    • alternatives:

      • text
      • confidence
    • final

    • endOfUtterance

In the Yandex SpeechKit v2 documentation, you can view the description of these fields and learn about the conditions under which they are added.

caution
  • Some data is added only if additional settings are specified for the ASR provider. To specify the settings, use the $dialer.setAsrProperty method.
  • If you want to use data that is not supported in $request.rawRequest, please contact our support team: support@just-ai.com.