79190393

Date: 2024-11-14 21:01:42
Score: 1
Natty:
Report link

You need to use an input audio stream which has the AcousticEchoCanceler effect applied.

The SpeechRecognizer API doesn't have a way to simply turn that on. You need to capture input audio yourself, then pass that into the SpeechRecognizer through EXTRA_AUDIO_SOURCE.

The input audio stream needs to be configured in a way that supports the AcousticEchoCanceler effect. https://stackoverflow.com/a/38021196 has more details on that.

Since you asked about Google Assistant: apps like that probably don't use the SpeechRecognizer API since they're trying to detect a specific phrase (a more specialized model would be more effective).

Reasons:
  • Blacklisted phrase (1): stackoverflow
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Ahaan Ugale