text to speech javascript. 3 lines 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();