Skip to content

Instantly share code, notes, and snippets.

@jabrena
Created December 9, 2015 13:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jabrena/3c674d9afe20e7ecbd25 to your computer and use it in GitHub Desktop.
Save jabrena/3c674d9afe20e7ecbd25 to your computer and use it in GitHub Desktop.
Speaking with a human
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