Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEFUNCT #9

Open
black-snow opened this issue Dec 8, 2016 · 13 comments
Open

DEFUNCT #9

black-snow opened this issue Dec 8, 2016 · 13 comments

Comments

@black-snow
Copy link

Does this mean it stopped working?
Are you planning to take a new path? Like integrating wit.ai or others?
Japser is dead imho. There's things happening on the dev branch but nothing's ever coming to master and I never got it working on my raspi. It's a huge pita.

A simple npm i electron-speech would be awesome. I'm very interested into contributing to this :)

@hackergrrl
Copy link
Owner

hackergrrl commented Dec 8, 2016 via email

@zeke
Copy link

zeke commented Feb 22, 2017

It seems that Google has shut down the Chrome Speech API for use in shell environments like Electron, which electron-speech relies on.

I think this is probably happening because Electron has a baked-in Google API Key. In the early days of Electron it worked, but now there are enough users that we've cross the API limit and now we all get 403s when we try to do geolocation or speech recognition.

It might be possible to revive this project by using your own Google API key: http://electron.atom.io/docs/api/environment-variables/#google_api_key -- I know this works for geocoding. Not sure if it works for the speech APIs.

@bcomnes
Copy link

bcomnes commented Mar 27, 2017

@zeke I'll test that out and report back sometime soonish.

@bcomnes
Copy link

bcomnes commented Mar 27, 2017

Hrmmm... Not working even when I set the API env var after generating a key and enabling the speech api for it in the google apps dashboard.

$ export GOOGLE_API_KEY=xxxxx
$ ./cli.js
listening..
err network
done

Which looks like a possible credential error. @zeke Does the above approach look correct? The API key can be read from the ENV and doesn't need to be compiled into electron itself does it?

@zeke
Copy link

zeke commented Mar 27, 2017

The API key can be read from the ENV and doesn't need to be compiled into electron itself does it?

In the case of geocoding, I know you don't have to compile the var into your build. You just set it in your environment: https://github.com/electron/electron/blob/master/docs/api/environment-variables.md#production-variables

I'm not sure if the same applies to speech recognition. It seems really hard to get a straight story on Google's support for this.

@zeke
Copy link

zeke commented Mar 27, 2017

Just came across this issue: #10 -- sonus appears to be actively maintained. Could be a good alternative.

@bcomnes
Copy link

bcomnes commented Mar 27, 2017

I came across that last night before giving up for the evening. Will check it out. Thanks for the info!

@bcomnes
Copy link

bcomnes commented Mar 27, 2017

Aw shucks, requires a peer dependency of Sox. 🤔

@zeke
Copy link

zeke commented Mar 27, 2017

Looks like sox is a dependency of snowboy -- maybe that could be made optional in sonus?

cc @evancohen

@evancohen
Copy link
Contributor

@zeke it's only a dependency for their C++ and Python libraries - not the Node lib.
You need some way to record 16bit wav audio, so sonus supports both sox and arecord.

You might want to check out sonus-electron-boilerplate, just be aware of evancohen/sonus-electron-boilerplate#1.

@bcomnes
Copy link

bcomnes commented Mar 27, 2017

I tried using https://github.com/otalk/getUserMedia + https://github.com/kapetan/audio-stream + https://github.com/kapetan/pcm-stream but it didn't work. I'm not a wav expert, but at this point I would have to dig into the differences between what that pipeline produces and https://github.com/gillesdemey/node-record-lpcm16 + sox.

@bcomnes
Copy link

bcomnes commented Mar 27, 2017

I got it working! https://github.com/bcomnes/speech-test/blob/master/renderer.js Had the sample rate set wrong initially, but its working great now using getUserMedia an no Sox or peer deps. It does require a big old ugly Auth token though. Maybe we can ship one or add a setup step to get one generated on first use.

@zeke
Copy link

zeke commented Mar 27, 2017

Awesome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants