Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

218
Views
Speech Recognition Microphone is not working

Can you please tell me why my microphone is not working ? When I made some correction in app.js file I can see microphone is blinking twice and then is death. I believe microphone is on. Any suggestion how to fix this problem ? Thank you

here is my code:

const msgEl = document.getElementById('msg')

window.SpeechRecognition = window.SpeechRecognition ||
window.webkitSpeechRecognition;

let recognition = new window.SpeechRecognition()


// start recognition
recognition.start();

function onSpeak(e) {
  const msg = e.results[0][0].transcript;
  console.log(msg)
  
}

recognition.addEventListener('result', onSpeak);

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

It's working, but by default, the recognition service is not continuous, it will end after a single result or timeout. So if you need continuous results you should set the property as false:

let recognition = new window.SpeechRecognition()
recognition.continuous = true;

But now the new results will be appended to the recognition list everytime there is a new result, so you will have to modify the way you print the results:

function onSpeak(e) {
    let msg = e.results[e.results.length-1][0].transcript;
    console.log(msg)
}

And if you do not want it to end on timeout if there is no activity, you may try this:

recognition.onend = function() {
    console.log('Speech recognition has stopped. Starting again ...');
    recognition.start();
}

References:

https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognition https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognition/continuous

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!