A Almog Active Member Licensed User Mar 31, 2018 #1 Hi I want to automatically restart the Voice Recognition Service(https://www.b4x.com/android/forum/threads/voice-recognition-example.7317/#content), in case of the user didn't say anything(and then the VR is stopping automatically) or there is no internet connection. May someone help me with this issue as soon as possible? Thank you very much.
Hi I want to automatically restart the Voice Recognition Service(https://www.b4x.com/android/forum/threads/voice-recognition-example.7317/#content), in case of the user didn't say anything(and then the VR is stopping automatically) or there is no internet connection. May someone help me with this issue as soon as possible? Thank you very much.
Erel B4X founder Staff member Licensed User Longtime User Mar 31, 2018 #2 Something like: Code: Copy Sub Button1_Click Dim Success As Boolean Do Until Success VR.Listen Wait For VR_Result (Success As Boolean, Texts As List) If Not(Success) Then Sleep(100) Loop ToastMessageShow(Texts.Get(0), True) TTS1.Speak(Texts.Get(0), True) End Sub Upvote 0
Something like: Code: Copy Sub Button1_Click Dim Success As Boolean Do Until Success VR.Listen Wait For VR_Result (Success As Boolean, Texts As List) If Not(Success) Then Sleep(100) Loop ToastMessageShow(Texts.Get(0), True) TTS1.Speak(Texts.Get(0), True) End Sub
A Almog Active Member Licensed User Mar 31, 2018 #3 Erel said: Something like: Code: Copy Sub Button1_Click Dim Success As Boolean Do Until Success VR.Listen Wait For VR_Result (Success As Boolean, Texts As List) If Not(Success) Then Sleep(100) Loop ToastMessageShow(Texts.Get(0), True) TTS1.Speak(Texts.Get(0), True) End Sub Click to expand... Yes, I tried that but it didnt work also. I mentioned that when the VR 'window' is showing the text "There is no internet connection", it waits until the user will press the mic button, but I need that if (for example) there is no internet connection, the VR dialog will start recording again automaticcaly, and not will wait until I press the button. Do you please know how can I do that and answer me as soon as possible you can? Thanks in advance. Upvote 0
Erel said: Something like: Code: Copy Sub Button1_Click Dim Success As Boolean Do Until Success VR.Listen Wait For VR_Result (Success As Boolean, Texts As List) If Not(Success) Then Sleep(100) Loop ToastMessageShow(Texts.Get(0), True) TTS1.Speak(Texts.Get(0), True) End Sub Click to expand... Yes, I tried that but it didnt work also. I mentioned that when the VR 'window' is showing the text "There is no internet connection", it waits until the user will press the mic button, but I need that if (for example) there is no internet connection, the VR dialog will start recording again automaticcaly, and not will wait until I press the button. Do you please know how can I do that and answer me as soon as possible you can? Thanks in advance.
A Almog Active Member Licensed User Mar 31, 2018 #4 I will ask this question again because this is another question. Upvote 0