hi, i have this code, and my problem is that when this function is called for
the second time or third time i have a null pointer exception in this line:
Please avoid starting duplicated threads about the same problem. It will not
help you to start 20 threads, it will only create a mess in this forum. Please
continue discussion in previous thread.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
hi, i have this code, and my problem is that when this function is called for
the second time or third time i have a null pointer exception in this line:
String bestResult = result.getBestFinalResultNoFiller();
it so happens that result is null. What can i do to resolve this problem? so
many thanks....
this is the function:
public String recognizeAndReport() throws GrammarException {
String bestResult="";
if(microphone.startRecording()){
Result result = recognizer.recognize();
bestResult = result.getBestFinalResultNoFiller();
}
microphone.stopRecording();
microphone.clear();
return bestResult;
}
Please avoid starting duplicated threads about the same problem. It will not
help you to start 20 threads, it will only create a mess in this forum. Please
continue discussion in previous thread.