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

Annyang keeps starting and stopping #439

Open
Baudin999 opened this issue Jun 29, 2021 · 0 comments
Open

Annyang keeps starting and stopping #439

Baudin999 opened this issue Jun 29, 2021 · 0 comments

Comments

@Baudin999
Copy link

Annyang does not seem to work on in my browser (see details below). The Annyang main page (demo app) does not work and I think it's the same reason as the reason why my own project does not work. The problem is made visible through SpeechKITT because I see the recording starting and stopping.

What I'm trying in my own application:

I am trying to get annyang (with SpeechKITT) added to my app. I use the following code:

if (annyang) {
            console.log("starting annayang");
            var commands = {
                "add something *name": function (name) {
                    alert(name);
                },
            };
            annyang.addCommands(commands);
            SpeechKITT.annyang();
            SpeechKITT.setStylesheet(
                "//cdnjs.cloudflare.com/ajax/libs/SpeechKITT/1.0.0/themes/flat.css"
            );
            SpeechKITT.vroom();
        } else {
            console.log("annayang is missing");
        }
}

Expected Behavior

I expect, when I press the "mic icon" and start voice that I can talk and the voice commands get recorded and handled.

Current Behavior

What happens is that I click start and it immediately stops. If I add a onStop handler it immediately get's fired after the onStart handler.
Annyang get's configured only once, I can read out the console.log("starting annayang");.

Possible Solution

I've tried: #257, but to no avail.
I am working in a svelte app. At first I thought it was because the app rerenders, but this wasn't it. I've tried the main index page and also a separate page without anything on it, the behavior is the same.

Context

I'm working on an app where voice commands would help people who have trouble typing, this component is an important part of the app.

Your Environment

  • Version used:
    • annyang 2.6.0 (loaded through cloudflare
    • SpeechKITT 1.0.0 (loaded through cloudflare)
  • Browser name and version: Brave Version 1.26.67 Chromium: 91.0.4472.114 (Official Build) (64-bit)
  • Operating system and version (desktop or mobile): Windows 10
  • Link to your project: can't link it, if needed I can try and replicate in another project.
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

1 participant