// Narrate some text: var msg = new SpeechSynthesisUtterance('Hello world!'); window.speechSynthesis.speak(msg); // Cancel the narration: window.speechSynthesis.cancel();