I used speechSynthesis API in this way:
speechSynthesis.speak(new SpeechSynthesisUtterance(\"hello world\"));
But right now I get error aft
A simple hack, without needing a real user activity, is to execute a click event on a hidden button like so.
document.querySelector('button').click(); var msg = new SpeechSynthesisUtterance('Test');