Skip to content

Instantly share code, notes, and snippets.

@Tuizi
Last active October 27, 2016 20:06
Show Gist options
  • Save Tuizi/ffa68e6a5991f2a718ce02ba79f2bff4 to your computer and use it in GitHub Desktop.
Save Tuizi/ffa68e6a5991f2a718ce02ba79f2bff4 to your computer and use it in GitHub Desktop.

English

var msg = new SpeechSynthesisUtterance('Hello! how are you today?');
msg.lang = 'en-US';
window.speechSynthesis.speak(msg);

French

var msg = new SpeechSynthesisUtterance("Bonjour, comment allez vous aujourd'hui?");
msg.lang = 'fr-CA';
window.speechSynthesis.speak(msg);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment