A Almog Active Member Licensed User Jan 19, 2019 #1 Hello, I tried to use Voice Recognition offline with intent. https://developer.android.com/reference/android/speech/RecognizerIntent#EXTRA_PREFER_OFFLINE Code: Copy Dim VR As VoiceRecognition Dim i As Intent VR.Initialize("vr") i.Initialize("android.speech.action.RECOGNIZE_SPEECH", "") i.PutExtra("android.speech.extra.PREFER_OFFLINE", 1000) VR.Listen2(i) but the voice recognition is not working offline. Does anybody know why its happening and if there is a way to fix it? (and how?) Thanks in advance.
Hello, I tried to use Voice Recognition offline with intent. https://developer.android.com/reference/android/speech/RecognizerIntent#EXTRA_PREFER_OFFLINE Code: Copy Dim VR As VoiceRecognition Dim i As Intent VR.Initialize("vr") i.Initialize("android.speech.action.RECOGNIZE_SPEECH", "") i.PutExtra("android.speech.extra.PREFER_OFFLINE", 1000) VR.Listen2(i) but the voice recognition is not working offline. Does anybody know why its happening and if there is a way to fix it? (and how?) Thanks in advance.
DonManfred Expert Licensed User Longtime User Jan 19, 2019 #2 EXTRA_PREFER_OFFLINE Optional boolean, to be used with ACTION_RECOGNIZE_SPEECH, Sounds like it is an Boolean Did you tried Code: Copy i.PutExtra("android.speech.extra.PREFER_OFFLINE", true) Upvote 0
EXTRA_PREFER_OFFLINE Optional boolean, to be used with ACTION_RECOGNIZE_SPEECH, Sounds like it is an Boolean Did you tried Code: Copy i.PutExtra("android.speech.extra.PREFER_OFFLINE", true)
A Almog Active Member Licensed User Jan 19, 2019 #3 Thank you, I now tried to do it but it's still not working... Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Jan 20, 2019 #4 You don't need to do anything special for this. If the speech engine supports offline mode then it will just work. Tested with this code: Code: Copy Sub Activity_Create(FirstTime As Boolean) vr.Initialize("vr") End Sub Sub Activity_Click vr.Listen Wait For vr_Result (Success As Boolean, Texts As List) Activity.Title = Texts End Sub Upvote 0
You don't need to do anything special for this. If the speech engine supports offline mode then it will just work. Tested with this code: Code: Copy Sub Activity_Create(FirstTime As Boolean) vr.Initialize("vr") End Sub Sub Activity_Click vr.Listen Wait For vr_Result (Success As Boolean, Texts As List) Activity.Title = Texts End Sub