【问题标题】:Can't load external ruleref Microsoft Speech Grammar无法加载外部 ruleref Microsoft Speech Grammar
【发布时间】:2012-08-22 22:38:16
【问题描述】:

我正在使用 Microsoft Speech API 来执行语音识别。

在我使用外部规则引用之前一切都很好(根据http://msdn.microsoft.com/en-us/library/hh361619

<grammar version="1.0" xml:lang="fr-FR" mode="voice" root="ruleCalendar" xmlns="http://www.w3.org/2001/06/grammar" tag-format="semantics/1.0">
  <rule id="ruleAddEvent">
    <item>Hello</item>
    <ruleref uri="#world" />
  </rule>
</grammar>

工作正常,但如果我用外部文件替换 ruleref,识别器会在 RecognizeCompleted 事件上循环并且似乎匹配任何内容。

    <ruleref uri="other.xml#world" />
  • 我试图引用一个非常简单的文件
  • 我尝试引用 cmnrules.cfg
  • 我尝试设置绝对路径
  • 文件上升解析错误如果我放错了
  • 如果我像 other2.xml 这样在 ruleref 中输入错误的值,它仍然会循环

C#代码在这里 l.75: https://github.com/JpEncausse/WSRMacro/blob/master/WSRMacro/WSRMacro.cs

我认为它没有找到由 ruleref 定义的文件。

  • 是否在相对路径中搜索?
  • 有没有办法设置默认语法目录?

【问题讨论】:

  • 这似乎是一个 COMException: 0x80045024 对无法解析的导入语法的规则引用。
  • 还发现了这个描述:bliny.net/blog/post/…

标签: grammar speech microsoft-speech-api


【解决方案1】:

根据previous comment,这似乎是一个已知的错误......

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-12-24
    • 2013-11-24
    • 1970-01-01
    • 2018-07-16
    • 2014-06-19
    • 2013-08-10
    • 2016-08-23
    相关资源
    最近更新 更多