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

JS Error in latest Firefox 63.0.3 #385

Open
smxsm opened this issue Nov 21, 2018 · 4 comments
Open

JS Error in latest Firefox 63.0.3 #385

smxsm opened this issue Nov 21, 2018 · 4 comments

Comments

@smxsm
Copy link

smxsm commented Nov 21, 2018

Although Firefox should support the Webspeech API now, annyang gives errors.

image

The problem here seems to be that Firefox does not support "recognition.continuous" (found out by using the non-minified script). If I comment out the two occurences of it in the script, the error goes away.
Anyang now seems to start, but it doesn't recognize anything... if I enable debug, I get another, weird, error:
image

If I have debug disabled, there are no errors, but also nothing happens ...
In case you are wondering, here is my script:

    if (annyang) {
        console.log("Annyang found ... listening");
        var commands = {
            'finde *tag': startSearch
        };
        annyang.debug(true);
        annyang.addCommands(commands);
        annyang.setLanguage('de-DE');
        annyang.start({ autoRestart: true, continuous: false });
        console.log("annyang started");
    }

Expected Behavior

Firefox should work, too :)

Current Behavior

Javascript errors, see above... If I "fix" them, still nothing happens ...

Steps to Reproduce (for bugs)

  1. Open Firefox
  2. in "about:config", search for "speech" and enable all relevant settings
  3. Go to https://www.talater.com/annyang/
  4. Try examples
  5. Check javascript console

Your Environment

Current Annyang version, latest Firefox 63.0.3., on MAC OS and Windows

@smxsm
Copy link
Author

smxsm commented Nov 21, 2018

It looks like even the official MDN Webspeech Demo doesn't work in Firefox ... no errors in the console, but also no reaction to anything, although at least the microphone icon in the address bar is blinking ... https://mdn.github.io/web-speech-api/speech-color-changer/

@smxsm
Copy link
Author

smxsm commented Nov 21, 2018

One last note - it looks FF needs a SpeechGrammarList to even start... if I hardcode that into your start() function, I get at least the microphone icon to blink red in Firefox - yet it still doesn't react to anything, just like the color switch demo... :(

            // beffy - FF needs a grammar to even start
            //var SpeechGrammarList = SpeechGrammarList || webkitSpeechGrammarList
            var grammar = '#JSGF V1.0; grammar colors; public <color> = aqua | azure | beige | bisque | black | blue | brown | chocolate | coral | crimson | cyan | fuchsia | ghostwhite | gold | goldenrod | gray | green | indigo | ivory | khaki | lavender | lime | linen | magenta | maroon | moccasin | navy | olive | orange | orchid | peru | pink | plum | purple | red | salmon | sienna | silver | snow | tan | teal | thistle | tomato | turquoise | violet | white | yellow ;'
            var speechRecognitionList = new SpeechGrammarList();
            speechRecognitionList.addFromString(grammar, 1);
            recognition.grammars = speechRecognitionList;

          recognition.start();

I have added all possible event handlers and a console.log inside all functions and events... so everything seems to start (and eventually end), but nothing is found, but e.g. "onnomatch" is not triggered either ... here is the output:

image

image

@rocketbear27
Copy link
Contributor

@smxsm: It works in FireFox 67 (the latest version)

@LarryBattle
Copy link

Related: #406

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

3 participants