Openhab 2 Squeezebox Text to speech?

Hi. Im fairly new to openhab so i was wondering how to get tts working. I know what there is tts you can download from the paper ui but i cant find any documentation on how to use it. I also know that there is an openhab 1 action for squeezebox to send voice to them but i cant find the action bundle or documentation for this in openhab 2. Anyone here knows how to configure it? the goal is for it to say goodmorning and read the time date and temperature and greet me when i get home. For now that is. Thanks in advance

I’ve been looking into this and it seems the OH2 Squeezebox binding currently has no channel defined to use TTS.

We could try to reach out to the binding developer and ask him if an update is foreseen.

@snoekieboe if you could make contact, id be very interested!

Already sent digital dan a PM :slight_smile:

2 Likes

He is very busy with other important stuff right now :slight_smile:
I would suggest you enter a feature request at https://github.com/openhab/openhab2-addons/issues and I will meanwhile make sure to add some documentation on all the new TTS features and how to implement it in bindings.

Thank you very much @Kai .Keep up the great work, there is huge potential in the work you do. Looking forward

Haha, thanks, but I read this as “currently it is completely unusable” :wink:

@Kai Then i have something to look forward to :slight_smile:

Hi, yes the port to OH2 did not include the TTS functionality. While I have a lot of other things on my plate I would be happy to point others in the right direction. It should not be difficult to implement this feature as the OH1 code shows how this could be done. If someone does pick this up, let others know so we don’t have multiple versions being worked on!

@digitaldan You should note that bindings are not expected to come with their own TTS service anymore now - instead, all they need to do is to register as an AudioSink, which enables them to use any of the existing TTS services. For the ones interested, this is how it has been implemented in the Sonos binding, also the Chromecast binding does it the same way - I assume it will look fairly similar for Squeezebox, too.

Even easier :wink:

It’s not merely easy, it is simply wonderful :heart_eyes:

Unfortunately i have very little to no knowledge about how the bindings work so i cant implement it.

@digitaldan
Issue for TTS feature was added here:

I implemented the AudioSink and TTS functionality in the squeezebox binding. When you get a chance, could you review my PR here. Thanks!

2 Likes

Fan-freaking-tastic work @mhilbush. This is just the icing on the cake. Great work, tested it out no issues so far. Really have been looking for a way of getting tts for a long time and since i have a radio this just makes it so much easier. Thank you! If you need help with the testing id be glad to!

1 Like

@Oliver_Roed_Scholer Glad it’s working, and thanks for testing! If you run into any issues, feel free to post here, or on the PR.

There are two issues of which I’m aware.

  • There are versions of squeezelite that will not play short duration TTS mp3 files (and potentially other mp3 files of very short duration). Anything after squeezelite v1.7 and through the current 1.8 release (1.8.5-823) will NOT play the TTS mp3 file. If you’re not getting any sound and you’re using piCorePlayer (which uses squeezelite), please check your version of squeezelite. I need Ralphy to make a fix for this.

  • When streaming from a remote service (such as Pandora), after the notification plays, it starts playing a new track, instead of picking up from where it left off on the currently playing track. I haven’t figured out of there’s a way to fix this.

Hi @mhilbush. So far the new audio capabilites are working excellent. I am trying to make a doorbell notification, do you know if its possible to play a mp3 file to many sinks instead of just 1? If i make it a rule it will systematically go through the code and playing one at a time. Thanks!

While I haven’t tried this, I suppose you could write a rule that syncs the players, sends the notification (to one player and it should play on all the synced players), then unsync the players. I would imagine that this will not properly restore whatever is playing on the other players. But, if that’s acceptable, then this might work.

The alternative is the one you already mentioned, which is to write a rule that plays the notification one each player one at a time. Not exactly what’s wanted, as you already point out. OTOH, if you’re in one room of the house, would you even notice that the other rooms are not playing at the same time?

Otherwise, I’m not aware of any other solution.

Hi, just came across this - as I’m new to openhab, is this change included in beta or the nightly builts? I’d like to give TTS a try…

Thank you!

It was merged yesterday, so it should be in today’s snapshot (nightly) build.

Let me know if you run into any issues.