안드로이드 / newtone:6.1.4
handleOnFinalResultConf 함수의 for 문에서 OutOfBoundsException 이 발생하는 이유를 알 수 있나요?
E/AndroidRuntime: FATAL EXCEPTION: Thread-1970
java.lang.ArrayIndexOutOfBoundsException: length=3; index=3
at com.dialoid.speech.recognition.SpeechRecognizer.handleOnFinalResultConf(SpeechRecognizer.java:634)
private void handleOnFinalResultConf(String[] texts, int[] intAryConf) {
DLog.d(“SpeechRecognizer”, “handleOnFinalResultConf”);
SpeechRecognizer.FinalResultConf resultconf = new SpeechRecognizer.FinalResultConf();
resultconf.texts = texts;
resultconf.intAryConf = intAryConf;
if (this.mListener != null) {
for(int i = 0; i < intAryConf.length; ++i) {
DLog.d(“SpeechRecognizer”, "Final Result - texts: " + texts[i] + ", confidences: " + intAryConf[i]);
}
this.mSpeechEventHandler.sendMessage(this.mSpeechEventHandler.obtainMessage(2, resultconf));
}
}