-
-
Save parzibyte/40667079822f81572c335d33d1393c4b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let textoAEscuchar = $mensaje.value; | |
if (!textoAEscuchar) return alert("Escribe el texto"); | |
let mensaje = new SpeechSynthesisUtterance(); | |
mensaje.voice = vocesDisponibles[$voces.value]; | |
mensaje.volume = 1; | |
mensaje.rate = 1; | |
mensaje.text = textoAEscuchar; | |
mensaje.pitch = 1; | |
// ¡Parla! | |
speechSynthesis.speak(mensaje); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment