readOut Loud js code example
Example: js narrate text
// Narrate some text:
var msg = new SpeechSynthesisUtterance('Hello world!');
window.speechSynthesis.speak(msg);
// Cancel the narration:
window.speechSynthesis.cancel();
// Narrate some text:
var msg = new SpeechSynthesisUtterance('Hello world!');
window.speechSynthesis.speak(msg);
// Cancel the narration:
window.speechSynthesis.cancel();