Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pocketsphinx VS Google Speech Recognition API

I am building a speech recognition android app that will act as a virtual personal assistant with tasks such as:

Make appointments/Reminders

Weather Info

General queries to Wolfram|Alpha / Wikipedia - (i.e Who directed Ghostbusters, whats the £-$ Exchange rate)

My question is wheather to use Pocketsphinx or the Google API?

Originally I set this up with "android.speech.RecognitionListener", worked great, however I want to implement Keyword spotting so the user doesn't need to have any interaction other than just speaking.

Apparently Google API doesn't support this, so I looked into using pocketsphinx for this, and still using google for the rest of the app (As I heard pocketsphinx is not as accurate?) However the two don't get along as they can't both occupy the microphone at the same time.

Is there a nice way to switch between recognizers? (cant even import both to same project)

Should I just go with pocketshinx and deal with the lower accuracy?

Suggestions would be helpful

Cheers

like image 960
Aphire Avatar asked Nov 21 '14 12:11

Aphire


1 Answers

For anybody who wants to implement a similar project, I have found a work around. It's abit hacky and not entirely clean, but it works.

Using the android speech recognizer with a toggle on/off switch like in many examples across the web, when onResults comes back, the string will be checked for said "hotword", if it is not present, discard the string, if it is, process it. Once the query has been processed and the text to speech is responding, programatically reclick the toggle button, ensuring constant listening.

Do the same on "onError" as well. I did also have it onPartialResults as well, but it appeared to make the thread crash, not entirely sure why but once it was removed everything seems to work nicely.

like image 162
Aphire Avatar answered Oct 07 '22 17:10

Aphire