Beep SpeechRecognizer

I use the SpeechRecognizer API for my application, and every time it starts, it plays a sound.

I would like to know how to disable it, so I could implement one of mine.

Thanks.

+1
android speech-recognition
source share
1 answer

If you use the button to activate and deactivate the recognizer, you can turn off the onclick sound. It doesn’t work fantastically if you constantly listen to it, however for clicks on a button this should be good :)

private AudioManager manager; manager = (AudioManager) getSystemService(Context.AUDIO_SERVICE); if (isChecked) { manager.setStreamMute(AudioManager.STREAM_MUSIC, true); speech.startListening(recognizerIntent); } else { manager.setStreamMute(AudioManager.STREAM_MUSIC, false); speech.stopListening(); speech.cancel(); } 

Hope this helps (sorry if this is abit of necrothread)

+1
source share

All Articles