In the console for a browser I can enter the following and it speaks that string:
speechSynthesis.speak(new SpeechSynthesisUtterance(“Currently it is 3 in the afternoon.”))
I’m trying to figure out how to add code to my OpenFl project that will do the same thing.
speechSynthesis is obviously an instance of js.html.SpeechSynthesis that exists somewhere. I don’t know how to access it. I’ve tried to create an instance of SpeechSynthesis but that produces a run-time error of “Can’t find variable: SpeechSynthesis”
Any ideas? Please give exact code lines to use. Thanks.