Twilio工作室说/收集提示
我们使用Twilio Studio来管理IVR流,在识别特定数字时遇到了一个问题 示例:Twilio将一个含有22的验证码识别为“tutu” 除了更改“识别语言”之类的设置外,我还想让Twilio比其他输入更能识别数字。有“语音识别提示”选项,这是一个逗号分隔的值列表,但您应该在其中添加什么?文档只讨论逗号分隔的列表,没有其他内容 感谢您的帮助Twilio工作室说/收集提示,twilio,speech-recognition,ivr,twilio-studio,Twilio,Speech Recognition,Ivr,Twilio Studio,我们使用Twilio Studio来管理IVR流,在识别特定数字时遇到了一个问题 示例:Twilio将一个含有22的验证码识别为“tutu” 除了更改“识别语言”之类的设置外,我还想让Twilio比其他输入更能识别数字。有“语音识别提示”选项,这是一个逗号分隔的值列表,但您应该在其中添加什么?文档只讨论逗号分隔的列表,没有其他内容 感谢您的帮助 提前感谢您可以查看在提示部分输入$OOV\u CLASS\u DIGIT\u序列是否对捕获的演讲结果有任何影响 另一个选项是通过将tutu转换为22的归
提前感谢您可以查看在提示部分输入
$OOV\u CLASS\u DIGIT\u序列
是否对捕获的演讲结果有任何影响
另一个选项是通过将tutu转换为22的归一化Twilio函数运行结果
为了避免这种情况,我建议在捕获数字时使用DTMF
// converts number words to integers (e.g. "one two three" => 123)
function convertStringToInteger( str ) {
let resultValue = "";
let arrInput = [];
let valuesToConvert = {
"one": "1",
"two": "2",
"to": "2",
"three": "3",
"four": "4",
"five": "5",
"six": "6",
"seven": "7",
"eight": "8",
"nine": "9",
"zero": "0"
};
str = str.replace(/[.,-]/g," "); // sanitize string for punctuation
arrInput = str.split(" "); // split input into an array
// iterate through array and convert values
arrInput.forEach( thisValue => {
if( ! isNaN(parseInt(thisValue)) ) { // value is already an integer
resultValue += `${parseInt(thisValue)}`;
} else { // non-integer
if( valuesToConvert[thisValue] !== undefined) {
resultValue += valuesToConvert[thisValue];
} else {
// we don't know how to interpret this number..
return false;
}
}
});
console.log('value converted!', str, ' ====> ', resultValue);
return resultValue;
}
我们同时支持DTMF和语音,因为我们有许多用户的DTMF信号无法工作。当你说$OOC_CLASS_DIGIT_SEQUENCE时-是在Studio中还是在运行?感谢Studio收集小部件提示。你有权推荐一些代码来规范你得到的回复。你能举个例子吗?:)