5

I have developed a Ionic app that uses Android Speech Recognition API via a Cordova plug-in. It worked fine a few days back, but one day it stopped working. I did not change any source code. Sometimes it immediately returns me an error: ERROR_NO_MATCH. Sometimes it worked for one second, gave me one or two words and stopped listening abruptly, regardless that I was still talking to it.

I reflected what has happened in recent days that may have caused problem.

  1. Changes to Google speech recognition server? It is not likely. I did not find anything about it from the web. But a weird thing is: I installed some other simple voice-to-text apps, they all seem to terminate listening prematurely.
  2. Changes to my computer? I have re-imaged my hard drive and reinstalled everything.
  3. Changes to my mobile phone? Maybe some auto update has affected the voice recognition part.

Anyone has the same problem? Any help is appreciated.

Edit 08/09/2016

What I have tried:

  1. Factory reset of my mobile phone
  2. Building the app with different Android API levels
  3. Uninstalling all updates to Google App, and disabling it

However, none worked.

Steven Xia
  • 51
  • 4
  • Do you have cordova media plugin installed? – Gandhi Sep 07 '16 at 05:20
  • No, I used the plugin from https://github.com/macdonst/SpeechRecognitionPlugin. I made some changes to it so that it gives me partial result. – Steven Xia Sep 07 '16 at 05:48
  • For that plugin to work, i believe cordova media plugin is required too. Thats how i made it work. Check out this link for working sample - https://github.com/gandhirajan/Cordova_Speech_Recognizer Hope it helps – Gandhi Sep 07 '16 at 06:00
  • You need to check Google Now version, most likely there was an update on your phone. – Nikolay Shmyrev Sep 07 '16 at 06:46
  • @NikolayShmyrev I have uninstalled all updates of Google App, but it still did not help. – Steven Xia Sep 07 '16 at 08:57
  • @Gandhi Including the media plugin does not solve the problem. – Steven Xia Sep 07 '16 at 09:03
  • @StevenXia Did you tried out that working sample as is in device? – Gandhi Sep 07 '16 at 09:50
  • @Gandhi No, I did not expect the problem, so after reinstalled everything on my computer, I built another version. Sadly, the problem occurred. – Steven Xia Sep 07 '16 at 11:10
  • @StevenXia Did you tried the code sample i sent in the link? – Gandhi Sep 07 '16 at 11:22
  • @Gandhi, Yes, I tried it. I has the same problem. It seems that the source code has no problem (coz it worked before). The problem is either with my phone or computer. – Steven Xia Sep 08 '16 at 01:48
  • @StevenXia Should be with device i feel. Did you update cordova recently? – Gandhi Sep 08 '16 at 04:45
  • @Gandhi, I am using the same Cordova as before. – Steven Xia Sep 08 '16 at 07:47
  • @StevenXia Did you tried testing it on device? Any error on console? – Gandhi Sep 08 '16 at 10:16
  • @Gandhi. Yes, I've tested on device.When error occurred, the error code is 7, ERROR_NO_MATCH. Then no more result came in. When there was no error, I could receive one or two words, despite that I was still talking to it. – Steven Xia Sep 09 '16 at 04:09
  • @stevenxia could you post your apk for testing? – Gandhi Sep 09 '16 at 12:02
  • @Gandhi: I tried it with other devices. The ERROR_NO_MATCH did not occur. So I guess it should be some unknown issue with that specific device. However, it still stopped listening very quickly. I decided to switch to other voice recognition tools with which I have more control. – Steven Xia Sep 14 '16 at 08:58
  • @StevenXia Thanks for the update. But the link which i sent you works for me – Gandhi Sep 14 '16 at 10:23
  • @Gandhi It also works for me with other devices, except that it stops listening if I stop speaking for less than 0.5 sec. I remember it was more patient one month ago :) This is not acceptable for my app, so have to switch to other tools anyway. Thanks for your help. – Steven Xia Sep 14 '16 at 13:12
  • @steven CIA cheers... Gud luck – Gandhi Sep 14 '16 at 15:19

0 Answers0