# Text to speech in a web app

**URL:** <https://forum.webosose.org/t/text-to-speech-in-a-web-app/1772>\
**Category:** App Development\
**Created:** [May 18, 2022, 1:59pm UTC](https://forum.webosose.org/t/text-to-speech-in-a-web-app/1772 "2022-05-18T13:59:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eigil\_Hysver](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.webosose.org/eigil_hysver/32/671_2.png) [@Eigil\_Hysver](https://forum.webosose.org/u/Eigil_Hysver)\
**Post date:** [May 18, 2022, 1:59pm UTC](https://forum.webosose.org/t/text-to-speech-in-a-web-app/1772/1 "2022-05-18T13:59:22Z")

</div>

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](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesis). 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!

---

<div class="post-metadata">

**Author:** ![NERGI](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.webosose.org/nergi/32/364_2.png) [@NERGI](https://forum.webosose.org/u/NERGI)\
**Post date:** [June 9, 2022, 6:21am UTC](https://forum.webosose.org/t/text-to-speech-in-a-web-app/1772/2 "2022-06-09T06:21:47Z")

</div>

Hi @Eigil_Hysver, welcome to the forum.

I have contacted our dev.team and have discovered that webOS OSE dosen't support SpeechSynthesis API. (webOS OSE doesn't have TTS engine for the API.)

By the way, I think you're using webOS TV, not webOS OSE. If you want more information about webOS TV, please visit the [TV Forum](https://developer.lge.com/community/forums/RetrieveForumList.dev?prodTypeCode=TV).

Thanks.
