The problem can be solved by correctly specifying the path to access the
grammar folder. This is how I solved it.
I moved the folder grammar into my
package folder under
src folder (I used Netbeans ) this will howevr depends with wherther you are using an IDE or not.
All I had to do was to specify the path in the init function
voce.SpeechInterface.init("C:/lib", false, true, "
./src/package_name/grammar", "digits");
I hope this will help someone.