我的应用程序有一堆对话框,要求调用者从列表中进行选择:
“您想要哪个?帐户信息、帐户更改、请求文件、与代表交谈。”
在伪代码中,它的显示方式如下:
<prompt>
Which would you like? Account Information, Account Changes, Request Documents, Speak to a Representative.
</prompt>
<grammar>
"Account Information": goto Account Info logic
"Account Changes": goto Account Change logic
"Request Documents": goto Documents logic
"Representative": goto Call Transfer logic
</grammar>
现在,这个语法不考虑呼叫者说“那个!”的情况。在听到其中一个选项之后。那将被认为是不合语法的,并且是错误的情况。我可以通过将对话框分成四个提示并在每个提示中使用冗余语法来解决这个问题:
<prompt>
Which would you like?
</prompt>
<prompt>
Account Information
</prompt>
<grammar>
"That one": goto Account Info logic
"Account Information": goto Account Info logic
"Account Changes": goto Account Change logic
"Request Documents": goto Documents logic
"Representative": goto Call Transfer logic
</grammar>
<prompt>
Account Changes
</prompt>
<grammar>
"That one": goto Account Change logic
"Account Information": goto Account Info logic
"Account Changes": goto Account Change logic
"Request Documents": goto Documents logic
"Representative": goto Call Transfer logic
</grammar>
<prompt>
Request Documents
</prompt>
<grammar>
"That one": goto Documents logic
"Account Information": goto Account Info logic
"Account Changes": goto Account Change logic
"Request Documents": goto Documents logic
"Representative": goto Call Transfer logic
</grammar>
<prompt>
"Request Documents": goto Documents logicSpeak to a Representative.
</prompt>
<grammar>
"That one": goto Call Transfer logic
"Account Information": goto Account Info logic
"Account Changes": goto Account Change logic
"Request Documents": goto Documents logic
"Representative": goto Call Transfer logic
</grammar>
但这是这样做的“正确”方式吗?有没有办法用一个对话框来做到这一点?
谢谢,
IVR 复仇者