joshua_lyon
(Josh, SharpTools.io Dashboard)
December 15, 2019, 4:37pm
7
The new Sonos Websocket DTH removed the text to speech methods that were previously available directly on the device handler, but you can use the steps in the following post to perform the TTS online and then play that TTS track:
Yes, SharpTools can do audio announcements. TTS is a bit more tricky due to the changes made to the websocket DTH.
SharpTools has access to all of the methods that the new Sonos Websocket DTH exposes including playTrack() and related commands. The playText() method which performed text-to-speech with the previous Sonos DTH is no longer available in the Sonos Websocket DTH.
So there’s not a built-in TTS method directly on the driver anymore, but you can play any file that’s hosted on the web.
So one approach is to use a service like fromtexttospeech.com and then use the resulting file in the playTrack() method.
Create the TTS File
Navigate to fromtexttospeech.com
Enter in your desired phrase and tap Create Audio File
(For testing purposes) Right-click the link of the resulting fil…