Config
Introduction
The config verb enables developers to customize the speech settings for the current session, or to collect speech or dtmf input concurrently while other verbs are running. The latter method proves particularly beneficial in certain use cases that involve integrating with specific conversational AI platforms.
When using this verb, the application’s execution is non-blocking, meaning that once the specified settings are modified, the program proceeds immediately to the next verb without waiting for the changes to take effect.
The config command can accept the following attributes:
Options
Option |
Description |
Required |
---|---|---|
synthesizer |
You can modify the default text-to-speech settings at the session level by adjusting the synthesizer property, which is explained in further detail under the ‘say’ verb. |
no |
recognizer |
To modify the default speech recognition settings at the session level, refer to the ‘recognizer’ property explained under the ‘transcribe’ verb. |
no |
notifyEvents |
An option is available to enable event notifications (in the form of verb status messages) over WebSocket connections using a boolean value. In order to activate this feature, WebSocket verbs must include an ‘id’ property. |
no |
bargeIn |
Provide the properties necessary for creating a ‘background’ gather verb. |
no |
bargeIn.enable |
If true, it is possible to initiate a ‘background gather’ that listens for speech or DTMF input while the session is executing other verbs. This allows the application to capture user input outside of a typical gather verb. If false, it will terminate all background listening tasks those are currently in use. |
no |
bargeIn.sticky |
If true and bargeIn.enable is true, then after a background gather has detected speech or DTMF input and is complete, it will automatically initiate another background gather. |
no |
bargeIn.actionHook |
Specify a webhook that will be triggered when user input is collected from the background gather. |
no |
bargeIn.input |
Array, you can choose from the following options: [‘digits’], [‘speech’], or [‘digits’, ‘speech’]. |
yes |
bargeIn.finishOnKey |
A key that indicates the completion of DTMF input. |
no |
bargeIn.numDigits |
Specify the precise number of digits that gather expects to collect. |
no |
bargeIn.minDigits |
Minimum number of digits that gather expects to collect. |
no |
bargeIn.maxDigits |
Maxinum number of digits that gather expects to collect. |
no |
bargeIn.interDigitTimeout |
The duration of time to pause between digits after the minimum number of digits has been entered during a gather verb. |
no |
record |
Manage call recording using SIPREC. |
no |
record.action |
String, you can choose from the following options: “startCallRecording”, “stopCallRecording”, “pauseCallRecording”, or “resumeCallRecording”. |
yes |
record.siprecServerURL |
URL for SIPREC Server. |
yes if option is “startCallRecording” |
record.recordingID |
String, to identify the recording. |
no |
Example
{
"verb": "config",
"synthesizer": {
"voice": "John"
},
"recognizer": {
"vendor": "google",
"language": "vi-VN"
},
"bargeIn": {
"enable": true,
"input" : ["speech"],
"actionHook": "http://example.com/userInput"
}
}
Please contact us for timely support via:
Phone: 1900-1563
Email: support@epacific.com.vn