Issue:
When users input digits during calls, the bot recognizes the input as words (e.g., “one two three”) instead of numeric digits (e.g., “123”).
Solution:
To ensure digit inputs are captured correctly as numerals, you can leverage Google’s Class Token feature when using Google ASR.
If Using Google ASR:
Simply add the class token in the call control parameter to capture digit inputs accurately. Below is an example configuration:
If Using Other ASR Providers:
You will need to override the ASR for the specific entity to switch to Google ASR temporarily. This allows digit input recognition with the class token enabled.
Here’s the Channel Override Template:
var message = {
"type": "command",
"command": "redirect",
"queueCommand": true, // mark it as 'false' if the entity node is very first node of dialog task flow
"data": [
{
"verb": "tag",
"data": {
"userNoInputCounter": 1,
"retryCount": 3
}
},
{
"verb": "gather",
"actionHook": "/actions/hooks",
"input": [
"digits",
"speech"
],
"recognizer": {
"vendor":"google", // ASR engine
"language": "en-US", // ASR language for English
"hints": ["$OOV_CLASS_DIGIT_SEQUENCE"] // google class token to capture the digits
},
"say": {
"text": "What is your Credit Card Number?" // add your respective prompt
}
}
]
}
print(JSON.stringify(message));
Adding the sample working screenshot below for your reference:
Note: This works in both XO 10 and XO 11 (UXO).
Please do let us know if you have queries.