Skip to content

[BUG] [Android] SpeechToText: StartListenAsync silently no-ops after auto-stop via silence detection #3212

@andreabusi

Description

@andreabusi

Is there an existing issue for this?

  • I have searched the existing issues

Did you read the "Reporting a bug" section on Contributing file?

Current Behavior

After a speech recognition session ends via automatic silence detection, calling StartListenAsync a second time silently returns without starting the recognizer. The caller receives no error, no event, and no indication that recognition did not start. A subsequent call to StopListenAsync produces the Android system warning "[SpeechRecognizer] not connected to the recognition service."
Only a third call to StartListenAsync succeeds.

Expected Behavior

Calling StartListenAsync should successfully start a new recognition session regardless of how the previous session ended (silence detection, manual stop, or error).

Steps To Reproduce

  1. Call StartListenAsync — recognition works correctly
  2. Wait for the session to end automatically via silence detection (AutoStopSilenceTimeout)
  3. Call StartListenAsync again — method returns silently, no recognition occurs, no error is raised
  4. Call StopListenAsync — Android logs [SpeechRecognizer] not connected to the recognition service
  5. Call StartListenAsync a third time — recognition works correctly again

Link to public reproduction project repository

none

Environment

- .NET MAUI CommunityToolkit: 14.1.1
- OS: Android 10
- .NET MAUI: 10.0.203

Anything else?

Fix: In SpeechRecognitionListener.OnResults(), set speechToText.CurrentState = SpeechToTextState.Stopped after invoking Results, mirroring what OnError() already does.

Metadata

Metadata

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions