ady624 / webCoRE

webCoRE is a web version of CoRE
GNU General Public License v3.0
251 stars 984 forks source link

Add ability to use textToSpeech #105

Open bjgeiser opened 4 years ago

bjgeiser commented 4 years ago

Devices such as the new local Sonos integration no longer include the custom capability playText and its derivatives. As devices more move to local execution such as the new Sonos they no longer have access to the TTS cloud service required to generate the TTS sounds. The solution to this problem is to have the SmartApp use the textToSpeech API as seen here in BigTalker:

https://github.com/rayzurbock/SmartThings-BigTalker-Orig/blob/db50483c97dab7ff92c3ada9232814b8e38b4d27/BigTalker.groovy#L2969

Once the sounds is generated it can then be sent to any capability that can play a url. For Sonos and most other the speakers this would be the Audio Notification capability.

Supporting this in WebCore will enable it to again play TTS sounds to Sonos and future local speakers from pistons.