Menu

Newbie: Using grammar, how am I supposed to handle numbers between 1-1000?

Help
Andreas
2015-10-24
2015-10-25
  • Andreas

    Andreas - 2015-10-24

    Hi, I'm very new to Pocketsphinx and voice recognition in general... I would like to handle a grammar involving numbers between 1-1000. Is this possible and if it, what is the best way to achieve this?

    I have a JSGF grammar that's basically like this:
    public <item> = <sport> <number1-1000> <unit>;

    So a person should be able to say this:

    "Soccer 4 goals"
    "Dart 995 points"

    I don't know how I'm supposed to handle numbers though.

    Currently I'm thinking like this: Add all combinations to my dictionary like:

    "one two three .... twenty, thirty ... one hundred two hundred ...."

    Create a grammar from this so when a person say "995", recognizer recognizes these 3 combinations:

    "nine hundred, ninty, five".


    Is there a better solution?

     
    • Nickolay V. Shmyrev

      No

       

Log in to post a comment.