Receiving speech and silence notification

The enableSpeechDetectionEvent parameter is used for instances where the bot requires voice detection or silence detection.

This parameter is different than speechDetection mentioned in Silence and speech detection, which is used to control/limit speech recognition (Speech-to-Text) services by VoiceAI Connect.

VoiceAI Connect Enterprise supports this feature from Version 3.18 and later.

How do I use it?

These parameters are controlled by the VoiceAI Connect Administrator, or dynamically by the bot during the conversation (bot overrides VoiceAI Connect configuration).

voiceDetected/silenceDetected is sent to the bot using the sendEventsToBot parameter:

Parameter

Type

Description

enableSpeechDetectionEvent Boolean

Enables speech detection detection on VoiceAI Connect to send voiceDetected/silenceDetected events to the BOT.

  • true: Enables sending voiceDetected/silenceDetected to the bot.

  • False (default): disables VoiceAI Connect from sending voiceDetected/silenceDetected to the bot.

In the config message from VoiceAI Connect to SBC, speechDetection will be set to true if either speechDetection or enableSpeechDetectionEvent are enabled/true.

speechActivitySilencePeriodMS Number

Defines the timeout for silence detection on VoiceAI Connect. If silence is detected for this duration, VoiceAI Connect will consider it as if the user is in silence and will send out silenceDetected event to Bot.

The valid value is 0 to 10000 milliseconds.

The default is 1000 milliseconds.

speechActivityVoicePeriodMS Number

Defines the timeout for voice detection on VoiceAI Connect. If voice is detected for this duration, VoiceAI Connect will consider it as if the user is speaking and will send out voiceDetected event to Bot.

The valid value is 0 to 10000 milliseconds.

The default 0 milliseconds (i.e., no timeout).

Example:

{
  "message": "ConfigCall",
  "speechDetection": true,
  "speechDetectionSilencePeriodMS": 500,
  "sessionID": "90a12cde-af30-456e-b013-085cac67d590"
}

Example of events sent to bot:

{
  "name": "voiceDetected",
  "type": "event"
}

 

{
  "name": "silenceDetected",
  "type": "event"
}