Search code examples
grammarspeech-recognitioncontext-free-grammarsapi

Combine free-form dictation and semantic in a srgs grammar


I'm trying to combine both the result of a semantic and a dictation request in the semantic value of a SRGS document. For example, I would say "Search potato" and the output would be something like out="Search Potato" where Potato is a random word spoken by the user. I tought about using the garbage special rule, but it doesn't seem to work. So far that's what I have :

<rule id="rule1" scope="public">
<one-of>
  <item xml:lang="en-us">Search</item>
  <item>Cherche</item>
</one-of>
<tag>out.command="Search"</tag>
<tag>out.param1=<ruleref special="GARBAGE"/></tag>
<tag>out=out.command+out.param1;</tag>

I also saw that post : Free-form text with custom SRGS based Grammer where someone proposed the DICTATION tag. But the problem is that it doesn't seem to be SRGS compatible.

If it helps, i use tag-format="semantics/1.0"


Solution

  • If you look at the W3C paper "Extending SRGS to Support More Powerful and Expressive Grammars" you can see that this standards group sees the need for just the scenario you are mentioning (see example 1.a) but it currently is not supported in the SRGS standard. Your question is how to do this with SRGS but there are probably ways to achieve the same results outside of SRGS dependent upon the ASR platform being used.