This was asked before, but no one seemed to have a solution: Mect SpeechRecognizer Beep Sound
However, I would still like to know if anyone knows how to turn off the beep for SpeechRecognizer?
I am creating a speech recognition object: private SpeechRecognizer sr = SpeechRecognizer.createSpeechRecognizer (this);
And then in my class I create a speech reconnaissance similar to this
sr.setRecognitionListener(new listener()); Intent i = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH); i.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, RecognizerIntent.LANGUAGE_MODEL_FREE_FORM); i.putExtra(RecognizerIntent.EXTRA_CALLING_PACKAGE, getApplication() .getClass().getName()); i.putExtra(RecognizerIntent.EXTRA_MAX_RESULTS, 6); i.putExtra(RecognizerIntent.EXTRA_PROMPT, ""); i.putExtra(RecognizerIntent.EXTRA_SPEECH_INPUT_MINIMUM_LENGTH_MILLIS, 7000); sr.startListening(i);
Anyone with good ideas? I researched that I could create an AudioManager object (AudioManager mAudioManager), and then using setStreamSolo () I could mute the sound. But I'm not sure how to implement this. I added it to my instance code for the speech recognizer, and nothing happened. Is this something I should call from my main class?
mAudioManager.setStreamSolo(AudioManager.STREAM_VOICE_CALL, true);
Thanks in advance.
android voice-recognition audio
portfoliobuilder
source share