1

I'm running both of Sphinx and Google Speech Recognition (currently I'm using SpeechRecognizer with RecognizerIntent) on my app. Sphinx is running as a service which listening for keyword spot. Another one will be called in an activity.

Then Google Speech Recognition need be detected by Sphinx, so Sphinx can be temporary stop for Google Speech running. And then Sphinx will be resumed when Google Speech finished.

What all I need is how to determine if a Google Speech is available or not or have finished

Please help !

barryhunter
  • 20,886
  • 3
  • 30
  • 43
  • So what the problem is? When keyword is detected you start google speech recognition intent to recognize speech. On results received by the intent you start keyword spotting again. Is there anything wrong with that? – Nikolay Shmyrev Apr 22 '14 at 12:24
  • @NikolayShmyrev Alright. That flow works as well. But the problem is when another Google Speech Recognition out of my app is running, my keyword spotting service need to stop too. So how I know a Google Speech Recognition has been invoked on my phone ? – user3528569 Apr 23 '14 at 09:49
  • Another issue, when I invoke Google Speech Recognition from an activity, then click to home button on the phone (maybe Google Speech Recognition currently is running at this time). Then how should I stop Google Speech Recognition and call keyword spotting back again ? – user3528569 Apr 23 '14 at 11:27
  • You can catch that event with onPause, see the details http://stackoverflow.com/questions/3667022/android-is-application-running-in-background/5862048#5862048. You can have the flag if google asr is running and cancel it on pause appropriately. – Nikolay Shmyrev Apr 23 '14 at 11:44
  • Great! But I have another issue. The Google Speech Recognition does not stop immediately after invokes cancel(). So when I call keyword spotting immediately after invoked cancel(), an error has been occurred (AudioRecord start() status -38). Currently I'm using Thread.sleep(100) to resolve this issue but it's not a best and clear solution – user3528569 Apr 23 '14 at 14:58

0 Answers0