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) *;

     
    • 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 ];

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.