debugger22 / Jarvis

As the name suggests
MIT License
365 stars 91 forks source link

Google Speech API is DEPRECATED(?) What next? #17

Open bkeating opened 9 years ago

bkeating commented 9 years ago

Discovered this project through a mention in a recent Pycoder's Weekly Newsletter (Issue #147: Top of 2014). I've had Make a personal Jarvis on my list for a long time.

I got Jarvis up and running but Im error-ing out where it gets to the Google Speech API. The service no longer seems to be available and further searching tells me it's limited to 50 queries a day. Bummer, because it seems really great.

The Google Speech API is accessible through x-webkit-speech but this attribute seems to have been deprecated. What a run-around!

So the best I can find, assuming Google Speech API is gone, is the CMU Sphinx project. But sheesh, the Google Speech API seems so simple and offloading.

The way I've thought about Jarvis is; s/he takes on many interfaces. Like Jarvis in Iron Man, he's an intercom in his workshop, or built into his suit; probably other places, too. So maybe the web [browser] isn't a bad place to consider. It's certainly portable and can run on all operating systems.

There is this: https://github.com/Daniel-Hug/speech-input which seems to actually use Google's Speech API. So now I don't know what to think. Amazon's "Alexa" im guess, will be an web service as some point, but I don't want my Jarvis to require amazon, nor google.

The error I'm stuck on:

...
ValueError: No JSON object could be decoded
Error parsing result document: u'  <p>Your client does not have permission to get URL <code>/speech-api/v2/recognize?output=json&amp;lang=en_US&amp;key=*********************************</code> from this server. Invalid key.
...

An actual api key is cited in the actual output but I omitted it here. ¯(ツ)

srynot4sale commented 9 years ago

I wonder if https://wit.ai/ is a valid option

bkeating commented 9 years ago

Oh wow! I'll look into this.

I also stumbled upon PyObjC last night and got TTS working. Haven't tried STT but it looks supported. Am considering forking Jarvis and swapping out Google Speech API with OS Xs' built-in speech recognition. It would make my fork OSX-only, but Im sort of OK with that if it means smooth support.

Also, OS X's "com.apple.speech.synthesis.voice.karen.premium" voice is the best sounding.

srynot4sale commented 9 years ago

Good luck!

Make sure you post here with how you progress :-)

bkeating commented 9 years ago

One thing im very fascinated to learn from this project is how, exactly, you have Jarvis listening and idling. While in a noisy room there are a lot of false positives--which is understandable, but how it Listens, sleeps and wakes back up feels pretty great. I'll run through the code to see how, but conceptually, how was this achieved?

srynot4sale commented 9 years ago

I'd love to know too (I'm just watching this project out of interest) :)

UnbanTwin commented 9 years ago

annyangjs is also very good https://www.talater.com/annyang/

EDIT: ok annyang is only for the web my bad

Rich700000000000 commented 8 years ago

There's now a new Chrome WEB API if anyone wants to write a patch for that, or, if everyone's turned off from google, API.AI has a free tier and returns a json. They claim to have support for wearables, so they should work here.