Skip to content

Instantly share code, notes, and snippets.

@wallenoliveira
Created January 30, 2025 09:51
Show Gist options
  • Save wallenoliveira/a27323dfa973392400b32c58e55f3ecb to your computer and use it in GitHub Desktop.
Save wallenoliveira/a27323dfa973392400b32c58e55f3ecb to your computer and use it in GitHub Desktop.
código alternativo para ser usado na biblioteca de voz.
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.");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment