在 SRGS 语法中使用 VoiceXML 内置类型

发布于 2024-10-06 23:42:20 字数 584 浏览 0 评论 0原文

我正在尝试为包含数字的句子创建自定义语法,例如(收入增加了 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

赤濁 2024-10-13 23:42:20

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文