Created
December 9, 2015 13:38
-
-
Save jabrena/3c674d9afe20e7ecbd25 to your computer and use it in GitHub Desktop.
Speaking with a human
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
var msg = new SpeechSynthesisUtterance(); | |
var voices = window.speechSynthesis.getVoices(); | |
for(var i=0; i< voices.length; i++){ | |
console.log(voices[i].name); | |
} | |
msg.voice = voices[4]; | |
msg.lang = 'es-ES'; | |
msg.text = "Darh vader es un tio muy malo"; | |
window.speechSynthesis.speak(msg); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment