New Google Search update and B4A VR

NJDude

Expert
Licensed User
Longtime User
The new update of Google Search (version 3.3.11.1069658) makes B4A voice recognition to misbehave (Phone library), it seems Google has either added a parameter to detect end of speech (silence) or it's just a bug, to understand what I mean, just load and run an app that uses VR (you can try the Voice recognition sample and you will see that after you finish talking there's a long pause, the previous version of Google Search (version 3.1.25.941712) works just fine.

This problem happens on newer versions of Android (e.g. JB and KK).

It seems this is another case of Google shenanigans.
 

canalrun

Well-Known Member
Licensed User
Longtime User
I noticed this delay also when I took a VR app that I wrote a couple years ago and installed it on my Nexus 5. There seems to be a five or 10 second delay after speaking which I don't remember previously. It does eventually perform the recognition, but the delay is a little annoying. Is there something that can be done to avoid this delay?

Barry.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
I've attached Phone library v2.25. It allows you to create the voice recognition intent yourself.

There are some extra parameters that can be set: http://developer.android.com/refere...A_SPEECH_INPUT_COMPLETE_SILENCE_LENGTH_MILLIS

I didn't see any difference. However I also didn't see any delay.

Example:
B4X:
Dim vr As VoiceRecognition
Dim i As Intent
vr.Initialize("vr")
i.Initialize("android.speech.action.RECOGNIZE_SPEECH", "")
i.PutExtra("android.speech.extras.SPEECH_INPUT_POSSIBLY_COMPLETE_SILENCE_LENGTH_MILLIS", 1000)
vr.Listen2(i)
 

Attachments

  • Phone.zip
    78.3 KB · Views: 489
Last edited:

Gideon

New Member
I am having the same issue with my app, have you guys found a solution?
Users can press the red mic icon to submit the recording but its not very intuitive. it seems like its ignoring the:
SPEECH_INPUT_POSSIBLY_COMPLETE_SILENCE_LENGTH_MILLI &
EXTRA_SPEECH_INPUT_COMPLETE_SILENCE_LENGTH_MILLIS extras.
 

nibax

New Member
Licensed User
Longtime User
I've attached Phone library v2.25. It allows you to create the voice recognition intent yourself.

There are some extra parameters that can be set: http://developer.android.com/refere...A_SPEECH_INPUT_COMPLETE_SILENCE_LENGTH_MILLIS

I didn't see any difference. However I also didn't see any delay.

Example:
B4X:
Dim vr As VoiceRecognition
Dim i As Intent
vr.Initialize("vr")
i.Initialize("android.speech.action.RECOGNIZE_SPEECH", "")
i.PutExtra("android.speech.extras.SPEECH_INPUT_POSSIBLY_COMPLETE_SILENCE_LENGTH_MILLI", 1000)
vr.Listen2(i)
I tried it but not working we are sure that is it correct MILLI and not MILLIS?
 

Gary Milne

Active Member
Licensed User
Longtime User
I tried this tonight and I cannot get any of the timers to have any effect whatsoever on the wait times for the VR. VR works but you can't hang about when you are talking. These are the timers I tried using.

B4X:
i.PutExtra("android.speech.extras.SPEECH_INPUT_COMPLETE_SILENCE_LENGTH_MILLIS", duration)
i.PutExtra("android.speech.extras.EXTRA_SPEECH_INPUT_POSSIBLY_COMPLETE_SILENCE_LENGTH_MILLIS", duration)
i.PutExtra("android.speech.extras.SPEECH_INPUT_MINIMUM_LENGTH_MILLIS",duration)

This is on Android 4.4.4 which is the most current for the Nexus 7 at time of writing.
 

hookshy

Well-Known Member
Licensed User
Longtime User
I agree with you and still wondering how we will solve this problem
Tested with android 4.3, 4.4 several devices ... some versions of google voice search have no problem some are imposibile to work with :(
Eboda_Storm x450
Huavey ascend y430 ...and many others...

Strange thing is that google voice search has absolutly no problems ... while our vr is a pain using it ... it does not stop at all ...

I was truly impressed on android 2.3.6 wow you could use it with music in your car ...
now ...I am so stressed out by these noise problems


It is a mess .... on some devices with the latest version of google voice recognition works and on other not ... and the reverse is valid from device to device ....
some users have to upgrade for vr to work some need to unistall updates :rolleyes:
 
Last edited:
Top