Why did RecognitionListener stop working in JellyBean?

前端 未结 4 1145
清酒与你
清酒与你 2021-02-01 08:07

For everyone using Android\'s voice recognition API, there used to be a handy RecognitionListener you could register that would push various events to your callbacks. In particu

4条回答
  •  北海茫月
    2021-02-01 08:41

    Google does not call this method their Jelly Bean speech app (QuickSearchBox). Its simply not in the code. Unless there is an official comment from a Google Engineer I cannot give a definite answer "why" they did this. I did search the developer forums but did not see any commentary about this decision.

    The ics default for speech recognition comes from Google's VoiceSearch.apk. You can decompile this apk and see and find see there is an Activity to handle an intent of action *android.speech.action.RECOGNIZE_SPEECH*. In this apk I searched for "onBufferReceived" and found a reference to it in com.google.android.voicesearch.GoogleRecognitionService$RecognitionCallback.

    With Jelly Bean, Google renamed VoiceSearch.apk to QuickSearch.apk and made a lot of new additions to the app (ex. offline dictation). You would expect to still find an onBufferReceived call, but for some reason it is completely gone.

提交回复
热议问题