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

Solved: Annyang in Chromium: keeps stopping and starting #257

Closed
hakhag opened this issue Feb 15, 2017 · 3 comments
Closed

Solved: Annyang in Chromium: keeps stopping and starting #257

hakhag opened this issue Feb 15, 2017 · 3 comments

Comments

@hakhag
Copy link

hakhag commented Feb 15, 2017

Hello!

So I'm trying to add annyang to a node.js app I'm running in the Cromium browser. Everything works fine in Chrome, but in Chromium I'm having some issues. Annyang tells me it keeps stopping and starting:

Speech Recognition is repeatedly stopping and starting. See http://is.gd/annyang_restarts for tips.

I know this can be caused with having multiple tabs/windows running annyang open, but I only have one active.

I have created the Google keys (https://www.chromium.org/developers/how-tos/api-keys) and placed them in my .bash_profile. However, I'm still getting this message and I'm suspecting I've done something wrong with the keys. Exactly where should I place them, and do I need to take any special steps in order for them to work? I'm on Mac OSX. Should also note that the printenv command in the terminal returns the right keys.

And for the record: I've tried running my localhost server on HTTPS with a Self Signed Sertificate also, but to no avail.

Thanks!

@sdawson26
Copy link

sdawson26 commented Feb 21, 2017

I've dealt with this issue before as well. You need to use these parameters to get it to stop:
annyang.start({autoRestart:false, continuous: false});

@hakhag
Copy link
Author

hakhag commented Feb 21, 2017

@sdawson26 thanks for reply. I've tried this, but it only results in annyang stopping right away (the recognition.onend is triggered almost immediately).

If I just start annyang with no parameters, the recognition.onstart is triggered a second later after recognition.onend, and recognition.onend is triggered again right after. This goes on forever.

Should note that this also happens on the official annyang website, https://www.talater.com/annyang/.

@hakhag
Copy link
Author

hakhag commented Feb 24, 2017

Right, so after alot of hairpulling why this didn't work I've figured it out. It came down to two errors I had made:

  1. I had enabled the "Google Cloud Speech API" and not the "Speech API". Apparantly these are two different things.
  2. I had to launch Chromium in the terminal with the command /Applications/Chromium.app/Contents/MacOS/Chromium so that it would register the API keys.

@hakhag hakhag closed this as completed Feb 24, 2017
@hakhag hakhag changed the title Annyang in Chromium: keeps stopping and starting Solved: Annyang in Chromium: keeps stopping and starting Feb 24, 2017
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

2 participants