Я использую голосовую функцию поиска в моем app.For этого я использовал, чтобы начать распознаватель речи с помощью Intent, как: -java.io.IOException: не может начать запись
iSpeechIntent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);
iSpeechIntent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);
iSpeechIntent.putExtra(RecognizerIntent.EXTRA_CALLING_PACKAGE, "voice.recognition.test");
iSpeechIntent.putExtra(RecognizerIntent.EXTRA_MAX_RESULTS, 3);
sr.startListening(iSpeechIntent);
Теперь я получил это исключение:
-ERROR|12-11 18:56:44.035|4053|4067||RecognitionControllerImpl|Caused by: java.io.IOException: couldn't start recording
ERROR|12-11 18:56:44.035|4053|4067||RecognitionControllerImpl| at java.io.BufferedInputStream.read(BufferedInputStream.java:324)
ERROR|12-11 18:56:44.035|4053|4067||RecognitionControllerImpl| at com.google.android.voicesearch.speechservice.RecognitionControllerImpl$1.handleMessage(RecognitionControllerImpl.java:251)
ERROR|12-11 18:56:44.035|4053|4067||RecognitionControllerImpl| at android.os.HandlerThread.run(HandlerThread.java:60)
ERROR|12-11 18:56:44.035|4053|4067||RecognitionControllerImpl| at android.os.Looper.loop(Looper.java:123)
ERROR|12-11 18:56:44.035|4053|4067||RecognitionControllerImpl| at com.google.android.voicesearch.speechservice.RecognitionControllerImpl.recordAndSend(RecognitionControllerImpl.java:522)
ERROR|12-11 18:56:44.035|4053|4067||RecognitionControllerImpl| at android.media.AmrInputStream.read(AmrInputStream.java:88)
ERROR|12-11 18:56:44.035|4053|4067||RecognitionControllerImpl| at com.google.android.voicesearch.speechservice.RecognitionControllerImpl.access$100(RecognitionControllerImpl.java:82)
ERROR|12-11 18:56:44.035|4053|4067||RecognitionControllerImpl| at com.google.android.voicesearch.speechservice.AudioBuffer.access$000(AudioBuffer.java:34)
Мой вопрос: как я могу справиться с этим исключением с помощью дескриптора исключений Uncaught?
Привет, Дипак, у меня такая же проблема, если вам удалось выяснить причину/решение? – MegaAppBear