Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

226
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda