Using tts on habpanel

How its works? I cannot find where to really use it.
My openhab is 1.8.x

My understanding is, and I could be completely wrong as I don’t use HabPanel, is that TTS runs on the server, not the clients. In other words, you can have a rule that executes the say action and it will speak that text through the soundcard on the server. I know of no way to pipe that audio to the clients (i.e. HabPanel, BasicUI, ClassicUI, etc) at this time.

I’d love for someone to prove me wrong.

@rlkoshak A lot of code has been commited to ESH/OH2 over the past couple of weeks in regards to audio which would blow your understanding out the water :slight_smile:

The new concepts are “audio sources” and “audio sinks”. You specify which audio sink should play a given audio stream. The audio source could be a local file or a url. The audio sink could be a device (e.g. sonos, chromecast) or webaudio stream and this allows you to pipe audio to remote clients*.

Both PaperUI and HABpanel subscribe to “webaudio” events and it’s taken next to no time to create a multi-room doorbell using cheap/spare tablets.

If you navigate to the PaperUI or HABpanel page from a client (PC, tablet, phone or whatever) and then type the following into the OH2 karaf console:

audio play webaudio doorbell.mp3

you will hear it play through the browser and thus having several tablets spread across the house gives you a cheap and cheerful implementation.

If you also then set up your TTS voices you can use the “say” command and send the resulting audio stream to the “webaudio” audio sink and get TTS to your browser.

Given how new this is, a tutorial on how to set it up in the Tutorials and Examples section I’m sure would be greatly appreciated by the community

Very interested in this fuctionality. Where can we learn more?

yeah i think something like if i send message txt to i don’t know ifft he send it back to an android tab i use as dashboard and then i could text people at home !

In order to send any “sound” to some device, this device must be a known"audiosink" for the system. PaperUI will show all Audiosink under Configuration/System/Audio as the list items for the default audiosink.
So I think that way no android device will get any sound, however using HABPanel you can select an Item for which each state change will be spoken. I use an string item onto which I type the command that my Sonos boxes shall say. If I set that item for that local voice feedback, the text should be said also by the device.
[Edit] Not working, sorry. HABPanel needs that setting locally. So you need to selet that item on each device, then it will be played on every change.