Android Question The "silence time" allowed in Voice Recognition

MegatenFreak

Active Member
Licensed User
Hi.
I was wondering if it is possible to make the phone's voice recognition allow greater silence intervals. You know, the VR returns if you're quiet for a couple of seconds. Can that interval be increased in any way?
Thanks in advance.
 

JohnC

Expert
Licensed User
I don't believe that is adjustable.

Some users have tried to restart the SR mode when silence is detected to simulate the SR staying on, but it had mixed results.
 
Upvote 0

MegatenFreak

Active Member
Licensed User
I know there is a way through Android Intents itself, through some class called RecognizerIntent, which contains something like this:
B4X:
public static final String EXTRA_SPEECH_INPUT_POSSIBLY_COMPLETE_SILENCE_LENGTH_MILLIS
And I know you can pass your own Intent to B4J's VoiceRecognition's "Listen" function, but I don't understand intents, and even if I did, I have no idea how to implement this static variable into it.
Any ideas?
 
Upvote 0

Syd Wright

Well-Known Member
Licensed User
This is interesting because In.PutExtra(RI.EXTRA_SPEECH_INPUT_COMPLETE_SILENCE_LENGTH_MILLIS,1000) does not work (at least not in my apps).
I have never tried the intent version with the word "POSSIBLY".
The difference is described here: https://developer.android.com/reference/android/speech/RecognizerIntent
Please observe Google's warnings that: "Additionally, depending on the recognizer implementation, these values may have no effect." I wonder why and also I wonder what is meant with "depending on recognizer inplementation"? I simply use Google's API...
 
Upvote 0
Top