sayAndCapture
- This action that plays a voice file (Text To Speech) into the call and captures the users DTMF input and reports back the DTMF via a webhook (Voice Call Action).
A few things to note:
- It is mandatory to have a VCA setup on the subaccount for this action to work properly.
- The CallFlow should not have a Hangup action right after the
sayAndCapture
action. (The captured DTMF will be ignored) promptMessage
is the text input for tts andsuccessMessage
is the text for TTS played for successful capture. failureMessage is the text for tts played in case of capture errors. Capture errors are either timeouts or the input digit count is out of the rangeminDigits
is the minimum required digits entered to be a valid input and themaxDigits
is the maximum digits accepted. IfcompleteOnHash
is false, once the user entered digits reachers maxDigits , the action will end. If thecompleteOnHash
is set to true, then any time user enters #, the entered digits will be validated and the action will end in either success or failure.noOfTries
define how many times the sayAndCapture will loop in case of failed inputs. digitTimeoutis the timeout in between two digit presses and theoverallTimeout
is the time allowed for the user to complete entering all digits.
Other parameters have same definition as in the say
action
voiceProfile
defines the characteristics of the generated speech. Choose one of the available Voice profiles to define the voice, gender and accent for the message you are sending. All available voice profiles can be found at here.repetition
controls how many times the speech is played back. The default value is 1.speed
controls the speed of the speech. (Accepted values are from0.5 - 2
, as a two-digit number. The default value is 1.text
The message body content to be converted to voice. Maximum voice message length is 3000 characters
Path for the new API
/POST voice.wavecell.com/api/v1/subaccounts/{sub-account-id}/callflows
- v1.2
Sample of a sayAndCapture
request
sayAndCapture
request{
"action": "sayAndCapture",
"params": {
"promptMessage": "Dear customer, on a scale of 1 to 5, Please rate our voice services",
"voiceProfile": "en-US-BenjaminRUS",
"repetition": 1,
"speed": 1,
"minDigits": 1,
"maxDigits": 1,
"digitTimeout": 10000,
"overallTimeout": 10000,
"completeOnHash": false,
"noOfTries": 1,
"successMessage": "Your response is recorded. Thank you",
"failureMessage": "Invalid rating input, please try again"
}
}