Android Speech Recognition as a service on Android 4.1 & 4.2

前端 未结 4 2161
一向
一向 2020-11-22 04:22

I have managed to get continuous speech recognition working (using the SpeechRecognizer class) as a service on all Android versions up to 4.1. My question concerns getting i

4条回答
  •  猫巷女王i
    2020-11-22 05:13

    For any of you who are trying to silence the beep sound, regrading the @HoanNguyen answer which is very good but be careful as said in the api set setStreamSolo is cumulative so if there is in error in the speech recognition and on error is called(for example no internet connection) then setStremSolo true is called again and again which will result in your app silencing the whole phone (very bad)! the solution to that is to add the setStremMute(false) to the speechRecognizer onError.

提交回复
热议问题