[英]Voicexml grammar
I try to use grammar in my voicexml file. 我尝试在voicexml文件中使用语法。 At first i tried an In-line grammar. 起初,我尝试了在线语法。 I used an example from a website, but it doesn't work. 我使用了一个网站上的示例,但是它不起作用。
here is the code: 这是代码:
<?xml version="1.0" encoding="UTF-8"?>
<vxml [...] version="2.0">
<form id="test">
<field name="var">
<prompt>choose</prompt>
<!-- ABNF -->
<grammar> one | two | three| four </grammar>
<filled>
you chose <value expr="var"/>
</filled>
</field>
</form>
</vxml>
thanks 谢谢
Your VXML grammar format may not be compatible with your platform. 您的VXML语法格式可能与您的平台不兼容。 Try this instead: 尝试以下方法:
<grammar root="main" version="1.0" xml:lang="en">
<rule id="main" scope="public">
<one-of>
<item>one</item>
<item>two</item>
<item>three</item>
<item>four</item>
</one-of>
</rule>
</grammar>
instead of... 代替...
<grammar> one | two | three| four </grammar>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.