D dagnabitboy Active Member Licensed User Longtime User Dec 19, 2011 #1 I've been experimenting with the voice recognition example on here and I don't see a way to detect when the google VR comes back with "no matches found" or to cancel it programmatically after some time out. Sorry if I've missed the obvious, but can someone point me in the right direction? Thanks!
I've been experimenting with the voice recognition example on here and I don't see a way to detect when the google VR comes back with "no matches found" or to cancel it programmatically after some time out. Sorry if I've missed the obvious, but can someone point me in the right direction? Thanks!
Erel B4X founder Staff member Licensed User Longtime User Dec 19, 2011 #2 There is a Cancel button in the voice recognition dialog. Success will be false when no match found or when cancel was pressed: Code: Sub VR_Result (Success As Boolean, Texts As List) If Success = True Then ToastMessageShow(Texts.Get(0), True) TTS1.Speak(Texts.Get(0), True) End If End Sub Upvote 0
There is a Cancel button in the voice recognition dialog. Success will be false when no match found or when cancel was pressed: Code: Sub VR_Result (Success As Boolean, Texts As List) If Success = True Then ToastMessageShow(Texts.Get(0), True) TTS1.Speak(Texts.Get(0), True) End If End Sub
D dagnabitboy Active Member Licensed User Longtime User Dec 19, 2011 #3 Thanks Erel, in my testing however, when there are no matches found a dialog appears an says "No matches found" with the choice of "speak again" or "cancel". the vr_result of success (true or false) is not passed to the handler until "cancel" is pressed. This prevents my having programmatic control of the VR function. Other apps are able to create their own dialogs if at all, to do their own timeouts, and to terminate the function at will. It would be nice to be able to do the same. In any case, I was simply exploring the functionality of the VR object and don't have a serious use for it at the moment, so not sure any improvements are needed at this point. Besides, I'm sure you have lot's of other things to keep you busy, and all the work you do is definitely appreciated! Upvote 0
Thanks Erel, in my testing however, when there are no matches found a dialog appears an says "No matches found" with the choice of "speak again" or "cancel". the vr_result of success (true or false) is not passed to the handler until "cancel" is pressed. This prevents my having programmatic control of the VR function. Other apps are able to create their own dialogs if at all, to do their own timeouts, and to terminate the function at will. It would be nice to be able to do the same. In any case, I was simply exploring the functionality of the VR object and don't have a serious use for it at the moment, so not sure any improvements are needed at this point. Besides, I'm sure you have lot's of other things to keep you busy, and all the work you do is definitely appreciated!
U unba1300 Guest Dec 21, 2011 #4 I tried the VR Example today, but get the message "Voice recognition is not supported." This was done using the emulator on a Vista machine with it's VR in listening mode. Does this only work on a real device? Thanks. Upvote 0
I tried the VR Example today, but get the message "Voice recognition is not supported." This was done using the emulator on a Vista machine with it's VR in listening mode. Does this only work on a real device? Thanks.
Erel B4X founder Staff member Licensed User Longtime User Dec 21, 2011 #5 I don't think that Android allows you to change the dialog. This is how it works. @LewLewSoft, Please start a new thread for this question. Upvote 0
I don't think that Android allows you to change the dialog. This is how it works. @LewLewSoft, Please start a new thread for this question.