我的 Android 应用程序 (Xamarin) 使用语音识别。这在 Android 8、11 和 12 的智能手机上运行良好。几周以来,我的应用程序的语音识别已停止在 Android 11 上运行(测试了 2 种不同的智能手机)。在Android 8 + 12下仍然可以正常运行!Gboard 语音识别仍然可以在 Android 11 上运行。我的 Android 11 智能手机上没有更新,我的应用程序也没有更新。
OnResults之前总是SpeechRecognizer用已识别的文本调用。现在,OnResults用空的 Bundle 来调用。
OnError被称为SpeechRecognizerError.NoMatch.
如果我使用 Intent 进行语音识别,它就可以工作!如果我使用具有相同参数的 SpeechRecognizer,则它不起作用。我必须使用 SpeechRecognizer,因为我不想在我的应用程序中使用 Android 对话框。
那么使用 SpeechRecognizer 有什么不同呢?
日志猫:
With Intent only
04-29 12:25:07.004 24526 24672 I A : TTL (0 seconds) reached - destroy SODA
04-29 12:25:07.007 961 961 D sound_trigger_platform: platform_stdev_check_and_update_concurrency: concurrency active 0, tx 0, rx 0, concurrency …Run Code Online (Sandbox Code Playgroud)