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

70
Visualizações
Speech Recognition Safari

I have created a Speech Recognition site following the API: https://wicg.github.io/speech-api/ . The site works in Chrome but not in Safari.

This makes sense: Based on the browser support details: https://developer.mozilla.org/en-US/docs/Web/API/Web_Speech_API/Using_the_Web_Speech_API#browser_support, (speech to text is currently limited to Chrome for Desktop and Android.)

But doesn’t make sense based on: https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognition#browser_compatibility  The last link, claims there is support.  

I am confused, does Safari offer support or not?

The error I get from Safari is: Speech recognition error detected: service-not-allowed  

What does this error mean?  

service-not-allowed

The user agent disallowed the requested speech recognition service, either because the user agent doesn't support it or because of reasons of security, privacy or user preference. In this case it would allow another more suitable speech recognition service to be used instead.

https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognitionErrorEvent/error

I tried giving explicit permission for the mic, in the Safari settings and in my computer settings. Didn’t work. I don’t know how to give explicit permission to safari for speech recognition. It should ask for permission, but it doesn’t. 

Does anyone have any advice on how to proceed to get speech recognition to work on Safari?

This is the code:


var recognition = new speechRecognition()

var textBox = $("#textbox")

var instructions = $("#instructions")

var cont = ''

recognition.continuous = true

// Recognition started

recognition.onstart = function () {
    instructions.text("Voice recognition is on")
}

recognition.onspeechend = function () {
    instructions.text("No speech detected")
}

recognition.onerror = function (event) {
    instructions.text('Speech recognition error detected: ' + event.error)
}

recognition.onresult = function (event) {
    var current =  event.resultIndex;
    var transcript = event.results[current][0].transcript;

    cont += transcript

    textBox.val(cont)
}

$("#start-btn").click(function (event) {
    if(cont.length){
        cont += ''
    }
    recognition.start()
})``` 

I created this based on this tutorial: https://www.youtube.com/watch?v=rwB6RqqCmXc 
about 4 years ago · Juan Pablo Isaza
2 Respostas
Responde à pergunta

0

I figured this out. For Safari, users need to enable dictation for speech to text to work. Details can be found here: https://bugs.webkit.org/show_bug.cgi?id=225298

about 4 years ago · Juan Pablo Isaza Relatório

0

Did you make sure you have an SSL certificate set up on the site? Sometimes the browser might block access to the microphone if it is not on a secure connection.

Now if this is a local site you can use a Self-Signed SSL certificate as a workaround if this isn't published.

about 4 years ago · Juan Pablo Isaza Relatório
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