1

I use RecognizerIntent and implement the RecognitionListener and implement all of its call back methodsas to do voice commands. And I try to adjust the parameters EXTRA_SPEECH_INPUT_MINIMUM_LENGTH_MILLIS,EXTRA_SPEECH_INPUT_POSSIBLY_COMPLETE_SILENCE_LENGTH_MILLIS and EXTRA_SPEECH_INPUT_COMPLETE_SILENCE_LENGTH_MILLIS to decrease the listen time but it seems not work. How can I do ?

Another question is about the recognition speed. I just have five voice commands in my system. But I need to pass and wait for the recognition result every time. Can I preprocess something or other methods to accelerate the recognition speed?

  • You seem to contradict yourself. First you say you want dictation, then you say you have just 5 voice commands. – Nikolay Shmyrev Oct 18 '15 at 16:47
  • Sorry! I fixed this typing error. – David Chang Oct 18 '15 at 18:08
  • For your first question, setting EXTRA_SPEECH_INPUT_MINIMUM_LENGTH_MILLIS , affects the minimum duration, not the maximum. – geokavel Oct 18 '15 at 22:02
  • Your first statement is that you are using the SpeechRecognizer class directly, and your next statements suggests you are using an Intent. Can you specify which one it is? – geokavel Oct 18 '15 at 22:06
  • There is a class called VoiceInteractor, which is introduced in Marshmallow, which probably will be able to handle multiple voice commands locally, but I don't know if it can at this time. – geokavel Oct 18 '15 at 22:51
  • Hi @geokavel, thanks for your answers. I already fixed my first question. – David Chang Oct 18 '15 at 23:44

1 Answers1

1

For the task you described it make sense to use closed-dictionary ASR system, such as pocketsphinx-android. You will be able to fine-tune pre- and post-speech wait intervals as well as speed-up the decoding as the recognition happens on-board rather than going back and forth to the cloud.

Alexander Solovets
  • 2,447
  • 15
  • 22
  • Hi @Alexander Solovets, Thanks for your advices. I'm trying to use pocketsphinx-android to do speech recognition. I run another demo program from [Pocketsphinx on Android](http://cmusphinx.sourceforge.net/wiki/tutorialandroid). It's good to recognize. But how can I set multiple keywords by using function call "addKeywordSearch"? I found the post [Recognizing multiple keywords using PocketSphinx](http://stackoverflow.com/questions/25748113/recognizing-multiple-keywords-using-pocketsphinx), but it is not work. – David Chang Oct 21 '15 at 10:28
  • I solved it. It's my mistake. I tuned the keywords threshold then it can run. – David Chang Oct 22 '15 at 01:39
  • But why it output many results when I just said one keywords or even did not say anything? Can I just get one result from each recognition? Sorry for lots of questions. – David Chang Oct 22 '15 at 01:46
  • I think from this point should better ask questions on the [cmu sphinx forum](http://sourceforge.net/p/cmusphinx/discussion/) providing portions of the source code. – Alexander Solovets Oct 22 '15 at 05:59
  • Thank you for your advice. I am looking for some solution on the forum. David – David Chang Oct 22 '15 at 06:07
  • Do you mind helping me? I am trying to simply recognize the word "hello" using pocketsphinx. Thanks! http://stackoverflow.com/questions/35388720/cant-start-service-speech-recog – Ruchir Baronia Feb 14 '16 at 23:44