TalAter / annyang

:speech_balloon: Speech recognition for your site
https://www.talater.com/annyang/
MIT License
6.57k stars 1.05k forks source link

Permission dialog keeps showing when used with Backbonejs #35

Closed jorgeguberte closed 10 years ago

jorgeguberte commented 10 years ago

I didn't have any luck using it with Backbonejs, the permission dialog keeps showing up, as if in loop, doesn't matter if i authorize or not. Here's the code, the annyang call is on line 118. And here's the app running

TalAter commented 10 years ago

Interesting. I see the loop you're referring to on Heroku... But if I run your app locally on my machine, the speech recognition works flawlessly. I will investigate and get back to you later today.

TalAter commented 10 years ago

Is the version in Heroku right now the same as the version on GitHub?

jorgeguberte commented 10 years ago

It wasn't, i just synced the versions. I was able to make it work both locally and on heroku, but not without issues. I had to click on the accept permission button several times, and once, after getting it working and switching tabs back and forth, the permission showed up again. When the permission works, everything works as well. Now i don't know if it's a bug on Backbone, Chrome or annyang.

TalAter commented 10 years ago

I just tested the version on Heroku, and it worked perfectly... I was able to search, including many phrases one after the other... can you help me recreate the problem on my machine?

TalAter commented 10 years ago

Is it possible you had two tabs or windows that both used speechrecognition open at the same time? Perhaps two tabs with your app, or one from localhost and one from heroku? Or even some other site that used the mic at the same time?

I believe I just found a bug in Chrome that may have caused what you're describing.

jorgeguberte commented 10 years ago

Yes! Exactly! When i had two tabs open, the problem happened. I had to close both of them to be able to get it working again.

TalAter commented 10 years ago

I have identified a problem with Chrome's implementation of SpeechRecognition, and am reporting it to their team... In the meantime, I should have a workaround for this in annyang tomorrow...

Keep me posted on life with annyang :)

jorgeguberte commented 10 years ago

Great. Glad to help :) So far, annyang has been super. Very easy to use and really effective. Thank you :D

alrra commented 10 years ago

I have identified a problem with Chrome's implementation of SpeechRecognition, and am reporting it to their team

Did you file the bug ?

TalAter commented 10 years ago

Not yet, I am preparing a few bug reports to send them.

alrra commented 10 years ago

Not yet, I am preparing a few bug reports to send them.

@TalAter great! After submitting them do post the links to the bugs here, thanks.

TalAter commented 10 years ago

@alrra - I've posted the bug, but it is currently only visible to members of the security team. Did you ask for the link because you're on the team, or know some of those guys?

alrra commented 10 years ago

@alrra - I've posted the bug, but it is currently only visible to members of the security team.

Ok.

Did you ask for the link because you're on the team, or know some of those guys?

Yes, I know some of the people on the Chrome team, but that isn't why I've asked. I've asked because it's usually a good practice to post the link to the bug so that people reading this issue can also star the bug or just refer to it for more information such as the status.

TalAter commented 10 years ago

It's actually unrelated to the bug mentioned above... I will be reporting that one separately.

I've reported https://code.google.com/p/chromium/issues/detail?id=291258 which is a crazy exploitable flaw in SpeechRecognition... front-page news serious. But as I said, it's only visible by the sec-team right now.

alrra commented 10 years ago

I will be reporting that one separately.

@TalAter Also, maybe it would be a good idea to maintain a list of known browser bugs in the wiki / separate issue.

TalAter commented 10 years ago

These two are actually issues in Chrome. I've been able to exploit the one above to crash Chrome, and the other one to seriously compromise the user... So I'd like to act responsibly and give the Chrome team a chance to address it before it goes public.

But in general, I agree that there is definitely a need for more detailed docs for annyang, including known issues/bugs/etc.

The talented Mr. @scribble-design is actually helping make that happen.

noahaddy commented 10 years ago

So glad you got on this. i just noticed that bug too. thanks for logging this bug.