Search code examples
javacmusphinxsphinx4

Full sentence voice recognition using sphinx


I am new to both java and sphinx4 Here i have downloaded sphinx and i am using eclipse editor so i added the jar files and my set up is ready Infact i also run the demo hello world example which was giving the output as expected .

But enter image description here Here in hello.gram we have given some input and only those words we could able to capture

    #JSGF V1.0;

/**
 * JSGF Grammar for Hello World example
 */

grammar hello;

public <greet> = (Good morning | Hello) ( Bhiksha | Evandro | Paul | Philip | Rita | Will );

what if i want to use other english words how do i need to do it

Any help would be highly appreciated.


Solution

  • If you want to keep using a grammar file, you can use "new" words by adding those words to the grammar file. As long as the dictionary contains the words you'd like to use, you're ready to go. If the dictionary does not contain the words you'd like to use, you would have to add them yourself.

    Take a look at this page: http://cmusphinx.sourceforge.net/doc/sphinx4/edu/cmu/sphinx/jsgf/JSGFGrammar.html it shows you how to set up a different grammar file.