Menu

Any argument/option in Pocketsphinx to control depth of serach in grammer with Kleene star?

Help
G10DRAS
2017-01-20
2017-01-20
  • G10DRAS

    G10DRAS - 2017-01-20

    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>

     
    • Arseniy Gorin

      Arseniy Gorin - 2017-01-20

      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>

       

Log in to post a comment.