Skip to content

Instantly share code, notes, and snippets.

@seanbehan
Created September 19, 2016 15:09
Show Gist options
  • Save seanbehan/bac06e07d5992f30295999c2f40a3005 to your computer and use it in GitHub Desktop.
Save seanbehan/bac06e07d5992f30295999c2f40a3005 to your computer and use it in GitHub Desktop.
text to speech with JavaScript
var text = document.getElementById('#textForSpeech')
var msg = new SpeechSynthesisUtterance(text)
window.speechSynthesis.speak(msg)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment