Hi, I'm investigating how we can enable simple text-to-speech feature in our LG web app.
I'm working with a WEBOS 2018 device. I have enabled Audio Guidance in the Accessibility menu.
On other devices (like samsung tv or my laptop) it works out of the box as this is a web standard. See SpeechSynthesis - Web APIs | MDN. For instance this simple line would say 'hello'
<button autofocus>Hello!</button>
If I try with luna API then it works. But if possible I'd like the built-in browser to handle it.
webOS.service.request("luna://com.webos.service.tts/", {
method:"speak",
parameters: {
text:"Hello",
clear: true
},
One interesting thing I noticed is that window.speechSynthesis.getVoices()
return an empty array.
Is there some magic switch somewhere to enable the web standard? Or are we forced to use luna API for tts on LG?
Thanks!