TalAter / annyang

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

Firefox 69.0.3 annyany errors! #406

Open Neilblaze opened 4 years ago

Neilblaze commented 4 years ago

Although Firefox should support the Webspeech API now, annyang gives errors! Firefox does not supports - "recognition.continuous" If I have debug disabled, there are no errors, but also it shows nothing!

Any fixes?

LarryBattle commented 4 years ago

The MDN docs say that Firefox don't currently support recognition.continuous. However, they post a workaround.

recognition.onresult = function(event) {
    ...
  recognition.start();
}

So maybe.... putting recognition.start(); at the end here could fix it. https://github.com/TalAter/annyang/blob/30cb1fe5a2e029d05656e572046142a9cfc5d189/src/annyang.js#L272

https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognition/continuous

Or you could disable if no support for recognition.continious https://github.com/TalAter/annyang/blob/30cb1fe5a2e029d05656e572046142a9cfc5d189/src/annyang.js#L198

Neilblaze commented 4 years ago

Thanks a lot. I did the same as you told, & it worked :)

NOPROD commented 4 years ago

Hi, no pull request ?