1

The speech recognition example (recognitionTest.java) given with Voce doesn't compile and gives a "Not a Valid Resource" error for the grammar file. (digits.gram) I have tried using both relative and absolute paths in the init function, but the same error occurs in both cases. This happens on both the Processing example as well as the standalone Java example.

I have successfully developed apps for both CMUSphinx and FreeTTS individually and they work just fine, but not when using it via Voce.

I am using Windows 8 x64 version and Java version 1.7.0_25.

Please help out as I realize several other people on various forums are facing similar problems.

1 Answer 1

1

I emailed Tyler Streeter, the creator of Voce and he helped me solve this problem.

Basically, the voce.SpeechInterface.init() is actually looking for a File URL and not a String as such.

So, here is how to make the code work :

try {
    grammarPath = new File("\\Path\\To\\grammar\\").toURI().toURL().toString();
} catch (Exception e) {
    help.setText("" + e);
}
 voce.SpeechInterface.init("./lib", true, true, grammarPath, "digits");

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.