Android Question Speech to text recognizer intent

Rusty

Well-Known Member
Licensed User
Longtime User
I need to extend the "listening" time of the speech to text recognizer and am unclear on how to issue the proper intent to do so.
I believe it is
EXTRA_SPEECH_INPUT_COMPLETE_SILENCE_LENGTH_MILLIS

I need the listener to listen for 5000 ms before terminating the listen.
I've tried:
B4X:
Dim i As Intent
        i.Initialize("RecognizerIntent.ACTION.RECOGNIZE_SPEECH", "")
        Dim Millis As Long = 5000
        i.putExtra("RecognizerIntent.EXTRA_SPEECH_INPUT_MINIMUM_LENGTH_MILLIS", Millis)
but this doesn't seem to work.
Any advice is appreciated.
Thanks in advance,
Rusty
 

Rusty

Well-Known Member
Licensed User
Longtime User
Thanks Erel,
I have been recording and trying to delay the end of speech using the above intent, to no avail.
However, I note that when I speak, then pause (end of speech fires), then I re-issue a start listening, the next piece of speech I record the volume of the audio is extremely low as to be almost inaudible.
This is not consistent in that if I repeat the above, the next audio segment may be a normal volume.
any ideas on why the audio volume would diminish and is there a way to control microphone volume?
Thanks,
Rusty
 
Upvote 0

Rusty

Well-Known Member
Licensed User
Longtime User
Thanks Erel...big oversight from the Google boys, eh?
I looked at your VR example noted two posts ago.
Is there a way to capture the onBufferReceived event for the VoiceRecognition function?
I've been using Steve Harris' library and also I have Tomas' library, both of which allow the event to fire, thus allowing me to stream the output to a file.
Thanks,
Rusty
 
Upvote 0
Top