Handling RecognitionListener Errors

前端 未结 4 1246
旧时难觅i
旧时难觅i 2021-01-03 03:29

I am using the Android\'s speech API to continuously getting input from the user. However this doesn\'t work quite well when errors occur.

What I do is restarting th

4条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-03 04:05

    I m posting this late , but this might help some one. I was also facing same error , & also it was not listening after some random time , i tried the following & it helped me somewhat, Try doing this ,

    case SpeechRecognizer.ERROR_RECOGNIZER_BUSY: 
            recognizer.destroy();
            startSR(); // As it destroys the current objects & calling startSR() will instantiate
                       // objects again 
    

提交回复
热议问题