Possible solution for Sonos and text to speech?

Hi guys,

While looking at was control solutions I stumbled upon the tts service of api.ai. Apparently you should be able to send a simple get request with the text and receive a wave file in return. I have not looked too hard at the Sonos side yet, but should not be possible to simply give it the URL for that request? It would then play the returned wave file on the designated speakers, correct?

The API reference is here: https://docs.api.ai/docs/tts

Hi @frankose,

Unfortunately, and after multiple research, it does not seem possible to read directly from a URL. Personally, I download the file, I copy it in a directory that I have included in the Sonos library and via a HTTP request, I start reading the file.

Thanks for the feedback. I’m disappointed that this does not work. I thought that was the whole point of something like playURI?

I don’t use the Sonos Binding because it’s not stable… I prefer use the Sonos HTTP API

Have a look at the posting SONOS, 'say' what?. There is a solution which works great for me!

Thanks, looks very interesting :slight_smile:

That sounds quite interesting. Are you using https://github.com/jishi/node-sonos-http-api?
Would you mind sharing a sample item config?

I have the problem, that sonos binding does not update item status when a hardware button on the device is pressed.
Thanks much

I don’t know this project, I use this one : https://github.com/DjMomo/sonos, but you need a server with PHP.
You can easy use the PHP class to create a file that returns the state of your Sonos.
And in your openhab, create a item with the HTTP binding