Question

I'm using Microsoft Speech API to perform Voice Recognition.

Everything was fine until I use an external ruleref (according to 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>

Works fine but if I replace ruleref by external file the recognizer loop on RecognizeCompleted event and seems to match anything.

    <ruleref uri="other.xml#world" />
  • I tried to reference to a very simple file
  • I tried to reference to cmnrules.cfg
  • I tried setting an absolute path
  • The file rise parsing error If I put error
  • If I put wrong values in ruleref like other2.xml it still loop

The C#code is here l.75: https://github.com/JpEncausse/WSRMacro/blob/master/WSRMacro/WSRMacro.cs

I think it do not find the file define by ruleref.

  • Did it search in relative path ?
  • Is there a way to set a default grammar directory ?
Was it helpful?

Solution

According to previous comment it seems to be a known bug ...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top