Skip to content

Instantly share code, notes, and snippets.

@Richienb
Created March 13, 2020 10:36
Show Gist options
  • Save Richienb/331238699bebcdd0b99cfa3ac0595e4b to your computer and use it in GitHub Desktop.
Save Richienb/331238699bebcdd0b99cfa3ac0595e4b to your computer and use it in GitHub Desktop.
Speak text in supported browsers.
const speakText = (text) => speechSynthesis.speak(new SpeechSynthesisUtterance(text))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment