Monday, May 20, 2024
8
rated 0 times [  10] [ 2]  / answers: 1 / hits: 7125  / 11 Years ago, mon, december 23, 2013, 12:00:00

I am currently trying to create my own J.A.R.V.I.S system as a web app. So of course, like any good J.A.R.V.I.S system, it needs good speech recognition. I have done research trying to find a JavaScript speech recognition API that I can customize as much as I like, and have decided to use Annyang. (It's simple, and works well)



I spent some time playing around with it, and just when I thought I had got it working, I ran into a problem. It wasn't working when I tried to view the file locally, so I hosted it on my computer with MAMP to see if it worked. It came up with the dialog saying localhost would like to access the microphone, but when I clicked allow, it reappeared. It kept reappearing and wouldn't go away until I clicked deny. I was using the following code:



<!DOCTYPE html>

<script src=http://cdnjs.cloudflare.com/ajax/libs/annyang/1.0.0/annyang.min.js></script>
<script>
if (annyang) {
// Let's define our first command. First the text we expect, and then the function it should call
var commands = {
'show tps report': function() {
alert(hello);
}
};

// Initialize annyang with our commands
annyang.init(commands);

// Start listening. You can call this here, or attach this call to an event, button, etc.
annyang.start();
}
</script>


Which is the demo code they supplied on their website.



If anyone can help me figure out why it is repeatedly asking to use my microphone when I click allow, then thank you in advance!



Cheers,
Fjpackard.


More From » google-chrome

 Answers
11

https://github.com/TalAter/annyang/issues/53



Please read through the whole issue. You might need to setup HTTPS for it.


[#49284] Saturday, December 21, 2013, 11 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
rocky

Total Points: 316
Total Questions: 108
Total Answers: 110

Location: Mali
Member since Sat, Feb 12, 2022
2 Years ago
;