javascript – Voice Recognition Web Kit Speech Recognition Not Working

Question:

Hello, I have added the Web Kit Speech Recognition API technology to the site, this technology is capable of voice recognition. My site is on a local server, but the browser does not allow access to the microphone, please tell me why this is, and how to fix it

var recognizer = new webkitSpeechRecognition();
recognizer.interimResults = true;
recognizer.lang = 'ru-Ru';
recognizer.onresult = function (event) {
  var result = event.results[event.resultIndex];
  if (result.isFinal) {
     alert('Вы сказали: ' + result[0].transcript);
  }
}
recognizer.start();

Answer:

I also tried from the server, it didn't work. We need a server with https. Well, or open it as a file, it works, but you need to give permission before each "wiretapping" (if there are several of them).

Scroll to Top
AllEscort