Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

102
Visualizações
Run html speech recognition while on another tab

Issue

Hi, I am currently having an issue with a piece of html that uses the annyang

framework for html speech recognition. With my current code, if you allow your microphone and say "Hello world" a new google tab will open. My issue is when you try saying "Hello world" and you aren't on the tab with my fiddle running, nothing will happen. Only when your on the actual tab with the code and you say "hello world" will something happen. Im wondering if theres a way my code could run in the background so no matter what tab you're currently on, if you say "hello world" my code will be triggered and open a new tab.

##Links ##

Link to a fiddle with my code: https://jsfiddle.net/04nc1mjd/

Link to the annyang framework used for speech recognition: https://github.com/TalAter/annyang

My code:

<!DOCTYPE html>
<html lang="es">
  <head>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/annyang/2.6.0/annyang.min.js"></script>
  </head>  
  <body>
    
<script>
  if (annyang) {

        var openNew = {  
    'Hello world': function() {
window.open("https://google.ca");

    }
    };
    
    annyang.addCommands(openNew);

  
    annyang.start();
 }
  
</script>
    
  </body>
</html>
about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda