1

I've added [Annyang]: https://github.com/TalAter/annyang to my AngularJS app, just as shown in the demo. Problem is, that Chrome fires the pop up to allow using the microphone when the application is up, and not only when start using Annyang. Why is does it happen?

index.html:

script src="//cdnjs.cloudflare.com/ajax/libs/annyang/2.6.1/annyang.min.js">

Angular code:

    private onVoiceSearchStart() {
        if (annyang) {
              // Let's define a command.

              var commands = {
                'search for *searchString': function(searchString) { 
                    // run search
                }
              };

              // Add our commands to annyang
              annyang.addCommands(commands);

              // Start listening.
              annyang.start();
            }
    }
4

1 回答 1

1

一旦触发浏览器的语音识别引擎开始收听,就会弹出权限请求对话框。这发生在您调用annyang.start().

于 2019-01-13T18:10:20.353 回答