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

151
Views
Lenguaje incorrecto de Web Speech API en Safari y navegador Firefox

He intentado hacer un texto a voz en mi página web con Web Speech API. El problema es que cuando el código se ejecuta en Safari y Firefox (probado solo en Chrome, Edge, Firefox y Safari todavía) no se lee en el idioma necesario, creo porque la lista de voces cambia en Safari y la lista vuelve a ser diferente. en Firefox, así que no pude arreglarlo, necesito que esté en idioma turco. (sin textID en el html no es un error, está incluido en el registro de la base de datos)

 <button id="cancelBtn" class="btn btn-outline-danger btn-xs rounded" style="padding: 4px 7px; margin-top: 15px;">Okumayi durdur</button> <button id="speakBtn" type="button" class="btn btn-outline-primary btn-xs rounded pull-right" style="padding: 4px 7px; margin-top: 15px;">Haberi Oku <i class="fa fa-bullhorn"></i></button> <?php $pt=$row['postdetails']; echo (substr($pt,0));?> <script> window.speechSynthesis.onvoiceschanged; function textToSpeech() { //alert("Test"); //for test only. const speech = new SpeechSynthesisUtterance(); let voices = speechSynthesis.getVoices(); let convert = document.getElementById("textID").innerHTML; speech.text = convert; speech.volume = 1; speech.rate = 1; speech.pitch = 1; speech.voice = voices[3]; console.log(voices[3]); speechSynthesis.speak(speech); } //function pause() { // window.speechSynthesis.pause(); //} function stop() { window.speechSynthesis.cancel(); } speakBtn.addEventListener('click', textToSpeech); //pauseBtn.addEventListener('click', pause); cancelBtn.addEventListener('click', stop); </script>
about 4 years ago · Juan Pablo Isaza
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!