在 SRGS 语法中使用 VoiceXML 内置类型
我正在尝试为包含数字的句子创建自定义语法,例如(收入增加了 345 亿美元)。
我使用 W3C 规范创建的规则如下所示:
<rule id="root" scope="public">
<item> <ruleref uri="#subject"/> </item>
<item> <ruleref uri="#direction"/> </item>
<item> <ruleref uri="#thenumber"/> </item>
</rule>
为了选取句子的数字部分,我想利用内置类型的 VoiceXML(例如)
<grammar type="application/srgs+xml" src="/grammars/number.grxml"/>
,或者使用某种数字模式库。最后一种选择是从头开始创建一组规则来识别任何数字。
任何帮助将不胜感激。
I am trying to create a custom grammar for a sentence containing a number, e.g. (Revenue increased by 34.5 billion dollars).
A rule that I created using W3C specification looks like:
<rule id="root" scope="public">
<item> <ruleref uri="#subject"/> </item>
<item> <ruleref uri="#direction"/> </item>
<item> <ruleref uri="#thenumber"/> </item>
</rule>
To pick up the numeric part of the sentence, I want to leverage a built-in type of VoiceXML (e.g.)
<grammar type="application/srgs+xml" src="/grammars/number.grxml"/>
or alternatively use some sort of library for number patterns. The last alternative would be to create a set of rules from scratch to recognize any number.
Any help would be greatly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
VoiceXML 标准内置类型都不支持自然数输入。
请咨询您的平台或语音识别供应商。他们可能会提供您想要的东西,这是自然货币语法(en-US)。或者,您可以编写自然数语法。它们并不简单,但英语的输入模式并不太难。我以前写过一篇,但我不拥有它的权利。对于语音识别行业中的大多数专业服务和平台供应商来说,这是相当常见的语法。
None of the VoiceXML standard built-in types support natural number input.
Check with your platform or speech recognition vendor. They may offer what you want, which is a natural money grammar (en-US). Alternatively, you can write a natural number grammar. They aren't trivial, but the pattern of input for English isn't too difficult. I've written one before, but I don't own the rights to it. It is a fairly common grammar for most professional services and platform vendors in the speech recognition industry.