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?
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.
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