Search code examples
androidvoice-recognitioncmusphinxpocketsphinx-android

New .gram file in pocketSphinx


Recognizing multiple keywords using PocketSphinx

I have a working on project as mentioned above and I have listed new set of words in my digit.gram file.

My doubt regarding this recognition is that I want to recognize a new ".gram" file instead of saying digits, which calls the digits.gram .

For example, instead of saying digits, I can say robot, then robot.gram will be called, how to make that possible?


Solution

  • You need to define multiple rules and combine them with a pipe. Like this:

    <digits> = one | two | three;
    <robot> = robot;
    public <command> = <digit> | <robot>;