0

I'm using the SpeechRecognizer API for an application I'm making on Google Glass that takes in speech. The problem that I was having was that the if the speech detector did not hear anything it would quickly stop listening and end the recognition process.

I found that the following Extra's could be added: EXTRA_SPEECH_INPUT_COMPLETE_SILENCE_LENGTH_MILLIS EXTRA_SPEECH_INPUT_POSSIBLY_COMPLETE_SILENCE_LENGTH_MILLIS

This could delay the time of when it stops listening. I implemented this into my code close to how the user who asked this question did(within the onClick() method set at 5000 milliseconds): Android extras about speech recognition does not work

Adding in the Extras did not change how the program ran so there was still no delay.

The answer says that it stopped working for Jelly Bean at the time. Is this the same for Google Glass with KitKat? And if so is there another way to fix this issue?

Any help would be greatly appreciated!

Community
  • 1
  • 1
Apurva
  • 1
  • 1

1 Answers1

0

If you have a defined list of commands, you might want to consider using a Contextual Voice menu, as mentioned in this post.

Using SpeechRecognizer, these are the Extras that you can add at this time when starting the activity: EXTRA_PROMPT, EXTRA_RESULTS_PENDINGINTENT, EXTRA_RESULTS_PENDINGINTENT_BUNDLE

Refer to this page for more information.

Community
  • 1
  • 1
Koh
  • 1,570
  • 1
  • 8
  • 6