I am trying to convert Speech to Text and im having no luck, I imported the JSAPI jar into my project but when I run my Script I get:
ava.lang.NullPointerException at CLAIRE.main(CLAIRE.java:13)
How do I change the variable from null and fix it?
public static void main(String[] args) {
try {
Recognizer rec = Central.createRecognizer(new EngineModeDesc(
Locale.US));
rec.allocate();
} catch (Exception e) {
e.printStackTrace();
}
}
The JSAPI implementation you're using does not support an US recognizer.
Check out createRecognizer
javadoc:
Returns:
a recognizer matching the required properties or null if none is available