是否可以识别打断?
是否可以识别主叫方是否使用 DTMF 打断? VoiceXML 中是否有类似事件之类的内容我可以捕获?
我试图解决的问题是我们需要插入来“级联”几个提示,因此我正在考虑设置一个变量,如果我可以识别插入,然后跳过接下来的几个提示。
Is it possible to recognize when a caller has barged-in with DTMF? Is there something in VoiceXML like an event that I could catch?
The problem that I am trying to solve is we need barge-in to 'cascade' for several prompts so I was thinking of setting a variable if I could recognize barge-in and then skip over the next few prompts.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您的浏览器支持标记(请参阅 VoiceXML 2.1 规范,第 4 节 使用标记检测插入在提示播放期间),您应该能够检测到打断。 但是,只有一部分浏览器支持标记,并且由于 DTMF 通常在与语音不同的路径上检测到,因此请确保您的浏览器在两个路径上都支持标记。 在某些情况下,甚至所使用的电话协议也会影响该功能是否存在(同样,这是用于将系统组合在一起的技术的产物)。
根据您的浏览器,一种可行的替代方法是创建一系列字段或表单。 每个都有一个非常短或不存在的超时。 在默认超时路径上前进,但如果收到不匹配或匹配则中断。 这对于某些浏览器来说效果很好,其他浏览器在字段/表单之间可能有明显的间隙。
If your browser supports mark (see VoiceXML 2.1 Spec, section 4 Using mark to detect barge in during prompt playback), you should be able to detect barge-in. However, only a subset of browsers support mark and because DTMF is often detected on a separate path than speech, make sure your browser supports mark on both paths. In some cases, even the telephony protocol being used can impact whether the feature exists (again, an artifact of the technologies used to put the systems together).
One alternative that may work, depending on your browser, is to create a series of fields or forms. Each with a very short or non-existent timeout. Go forward on the default timeout path, but break if you receive a nomatch or match. This will work fine for some browsers, other may have noticeable gaps between the fields/forms.