You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Android] SpeechRecognizer cannot recognize again after StopRecognitionAsync #26692
On Android, SpeechRecognizer.StopRecognitionAsync() calls Android.Speech.SpeechRecognizer.Destroy() after StopListening(). The native recognizer is released, so any later RecognizeAsync() on the same SpeechRecognizer instance fails. Dispose() does not call Destroy().
Expected behavior 🎯
As on WinUI, StopRecognitionAsync() ends the current recognition session and the same instance can recognize again. The native recognizer is released in Dispose().
How to reproduce it (as minimally and precisely as possible) 🔬
Create a SpeechRecognizer on Android and call CompileConstraintsAsync().
Call RecognizeAsync(), then StopRecognitionAsync().
Call RecognizeAsync() again on the same instance. It fails because the native recognizer was destroyed.
Workaround 🛠️
Create a new SpeechRecognizer after every StopRecognitionAsync().
Activity