Skip to content

Instantly share code, notes, and snippets.

@netomartinsns
Created January 21, 2025 12:10
Show Gist options
  • Save netomartinsns/2e9e7c3fe7042f7aca5e02ea68fe693c to your computer and use it in GitHub Desktop.
Save netomartinsns/2e9e7c3fe7042f7aca5e02ea68fe693c to your computer and use it in GitHub Desktop.
correção de erro em biblioteca
if ('speechSynthesis' in window) {
let utterance = new SpeechSynthesisUtterance(texto);
utterance.lang = 'pt-BR';
utterance.rate = 1.2;
window.speechSynthesis.speak(utterance);
} else {
console.log("Web Speech API não suportada neste navegador.");
}
@netomartinsns
Copy link
Author

Em uma atividade do curso anterior, vimos que estavam acontecendo alguns erros com a biblioteca Responsive Voice. Na atividade, foi fornecido um código alternativo para ser utilizado no lugar da biblioteca. Assim, você pode criar um gist com esse código alternativo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment