12

I'm trying to use the Android SpeechRecognizer class for "hands-free" continuous speech, but it does not seem to work at all. When the speech recognizer starts it does beep, but for some reason, it detects its own beep as speech, and then ends the speech but did not detect anything.

The odd thing is, if I use the German language offline library, everything works as expected. Just the English exits because of the beep (Samsung S4 and others) But, my Samsung tablet seems to work fine in English.

Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);
intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, "en");
intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, "en");
//intent.putExtra(RecognizerIntent.EXTRA_PREFER_OFFLINE, true);
this.speech.startListening(intent);
Nmk
  • 1,281
  • 2
  • 14
  • 25
James
  • 17,965
  • 11
  • 91
  • 146
  • I added a hack workaround to disable the beep sound, but seriously it detects it own beep as speech?? – James Jan 12 '17 at 02:37
  • Possible duplicate of [Android Speech Recognition as a service on Android 4.1 & 4.2](http://stackoverflow.com/questions/14940657/android-speech-recognition-as-a-service-on-android-4-1-4-2) – Nikolay Shmyrev Jan 12 '17 at 16:09
  • Yes, you have to mute beep. – Nikolay Shmyrev Jan 12 '17 at 16:09
  • why does german work, and english doesn't? why do some phone work, and some not? – James Jan 12 '17 at 16:37
  • 4
    This has been an issue for a very long time and Google are aware of it - I demonstrated it to them a few years back, by whistling, which made the recognizer immediately throw an error. It seems their network service is sensitive to noise it cannot convert to language. Their offline service is not so sensitive. I've noticed they've stopped using the beep in their Now application (beta). I lower the stream volume briefly before calling `startListening` and restore it afterwards. The beep remains audible, but is less likely to be detected as white noise and prevents the listener throwing an error – brandall Jan 23 '17 at 11:20
  • almost same post here http://stackoverflow.com/questions/21701432/continues-speech-recognition-beep-sound-after-google-search-update – Devendra Singh Jan 26 '17 at 07:06
  • Haha, the title remains me of a time my father woke himself up with his own snore. – Ellen Spertus Jan 23 '20 at 22:02

0 Answers0