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 Speech customization, 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 bot during the conversation (bot overrides VoiceAI Connect configuration).

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

Parameter

Type

Description

sendEventsToBot

Array of strings

If the value "voiceDetected" and/or "silenceDetected" are included in the array, VoiceAI Connect will send the voiceDetected and/or silenceDetected events to the bot.

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).

This parameter is controlled only by the VoiceAI Connect Administrator.

Parameter

Type

Description

enableSpeechDetectionEvent Boolean

Enables speech 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.

Example of events sent to bot:

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

 

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