Skip to content

Instantly share code, notes, and snippets.

@andy-polhill
Created December 12, 2014 12:22
Show Gist options
  • Save andy-polhill/986272c2dc507d99c938 to your computer and use it in GitHub Desktop.
Save andy-polhill/986272c2dc507d99c938 to your computer and use it in GitHub Desktop.
Chrome & Safari random voice speech bookmarklet
javascript:
var newUtterance = new SpeechSynthesisUtterance(),
voices = window.speechSynthesis.getVoices();
newUtterance.text = window.prompt("Say", "");
newUtterance.voice = voices[Math.floor(Math.random() * voices.length)];
window.speechSynthesis.speak(newUtterance);
@andy-polhill
Copy link
Author

Everyone loves a bit of friday fun, speech bookmarklet, picks a random voice and says what you tell it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment