For following grammer, is there any option in Pocketsphinx to control depth of search?
for ex:-
if speech contains phrases "oh mighty computer could you kindly please"
is it possible to restrict search till 2nd level so that pocketsphinx returns only "oh mighty computer could you" ?
JSGF V1.0
public <basiccmd> = <startpolite> ;
<startpolite> = (please | kindly | could you | oh mighty computer) *;</startpolite></startpolite></basiccmd>
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
For following grammer, is there any option in Pocketsphinx to control depth of search?
for ex:-
if speech contains phrases "oh mighty computer could you kindly please"
is it possible to restrict search till 2nd level so that pocketsphinx returns only "oh mighty computer could you" ?
JSGF V1.0
public <basiccmd> = <startpolite> ;
<startpolite> = (please | kindly | could you | oh mighty computer) *;</startpolite></startpolite></basiccmd>
Check
http://cmusphinx.sourceforge.net/doc/sphinx4/edu/cmu/sphinx/jsgf/JSGFGrammar.html
If you have star at the end, then it loops.
The solution I see the easiest would be to add a one more instance and drop the star in both
public <basiccmd> = <startpolite> <endpolite>;
<startpolite> = (please | kindly | could you | oh mighty computer);
<endpolite> = [ please | thanks | thank you ];</endpolite></startpolite></endpolite></startpolite></basiccmd>