SmartThings Community

SmartThings Text-To-Speech for Sonos (playText) not working?

@slagle mentioned that it’s working for some but not for others during last week’s Live Code Friday. He said that work continues on a permanent fix.

(Don’t mean to put words in your mouth, Tim. Please correct me if I’m off on anything. :innocent: )

Hi @Kristopher, I have launched a mediarenderer events smartapp and Weather Forecast , They have a new Text to speach alternative, works great form me, no more problems, I hope smarthings fix the TTS but in the meanwhile this alternative is an option.

Hey @ule - I saw that and appreciate it. I used voicerss and tried some others as well – for whatever reason my receiver doesn’t work with that provider. It does not work with Google TTS either for some reason, but it can play MP3s off S3 just fine. Looking into it more

Well shoot… I just majorly reworked my Goodnight Ubi app to use TTS and now it looks Text to Speech is broken. Bummer…

HI @chrisb, have you tried this workaround, it use google speeach and Voicerss service to allow text to speech, it works great form me, but its necessary to register in voicerss service, you can test the apps I have mod with this function.



1 Like

I have not tried that. I might take a stab at it.

I’m not familiar with the texttospeech() function though. I was using:

device.speak(message)

Is that not the best method to use?

Hi @chrisb, Yes, its a good method, but this method calls the texttospeech function inside the device type, this function is the official function and have problems, if you are using sonos or samsung speakers it going to fail (until ST fix the function) if you are using the latest DLNA media renderer, it use the fix, but you can send the url text audio to playTrackAndResume(uri, duration, volume) command and use the fix before send to speakers, check the code of Sonos Weather Forecast External TTS to known how to use the function

1 Like

[quote=“ule, post:68, topic:20142, full:true”]
Hi @chrisb, Yes, its a good method, but this method calls the texttospeech function inside the device type, this function is the official function and have problems,[/quote]

Ah… okay, that makes sense. I didn’t understand how device.speak and texttospeech() related.

Hmm… I thought I was using the latest version… maybe not though. I’m pushing text through to my tablet running Bubble Upnp. I’ll have to double check if I’m running the latest.

Okay… so I didn’t have the external TTS turned on in my device. I edited the device and saw the option. Turned it on. Yeah! Now I’ll just need to test tonight and see if it works.

So when will the textToSpeech() function be resolved?

textToSpeech() is the function that translates desired text phrases and returns audible files (mp3) to be played by connected SmartThings devices.

In it’s current state, when called, it often throws a terminating error stating “java.lang.reflect.UndeclaredThrowableException” if the requested phrase/audible file is not already cached on SmartThings servers. Sometimes it will convert and cache the phrase properly and then when the same phrase is called, it will work from then on, but most of the time new phrases throw this error and the SmartApps that rely on this function stop processing at this point (unless they use a try/catch routine).

I am handling this with a try/catch and notify in in the latest BigTalker SmartApp, but it would be nice for the issue to be resolved once and for all for all apps.

This has been an issue for many months! Why has it not been prioritized and resolved yet?

Related threads:












and so many more threads…
Please, SmartThings, resolve the issues with textToSpeech().

1 Like

I remember someone from ST mentioning that they are working on overhauling their TTS feature. I hope that overhaul fixes it and does not break it even further.

Up until very recently I was using my Ubi for all my voice announcements. Once I got Echo I was looking for ways to phase out my Ubi and rewrote my “Goodnight” app to use TTS.

Unfortunately it looks like I might have to switch back to Ubi until this gets fixed.

I know that ST has a lot going on all the time and this is surely just one issue, but I do think it’s a relatively big issue because it’s one of the ways that helps being HA to a more comfortable level. If we’re getting voice announcements of events rather than push notifications or text notifications this makes it feel more familiar and means we don’t need to stay glued to our devices when at home.

1 Like

That was me, and we are. No date yet. Trying to get a scope for this then I’ll have a better idea.

4 Likes

this would be awesome…

Glad I found this post as I was going mad as to why messages such as ‘Welcome Home Michael’ would work but ‘Welcome Home Mike’ or ‘Welcome Home Jenna’ wouldn’t! - just getting exceptions thrown.

I take it there is no more update to this but I’m going to add my name to the support ‘list’ as it’s ridiculous this isn’t working…in the meantime I’ll have a look at the workarounds posted above…

Hi @Mike_Turner, You can use a mediarenderer events, its like sonos notify with sound but with some fixes, you can use an alternative text to speech, try it

1 Like

Thanks Ule; I’ll give this a go and then move on to solve all the other issues that are riddled in this integration (missing lock triggers, presence sensor issues, Sonos resuming completely different tracks from what was playing…) - moan over…for now :wink:

2 Likes

@slagle Any update on the TTS issue with SmartThings? Its been just about a month since your last update. Do we have any idea on how soon it’ll be fixed. I’m $1200 in with Sonos based on Integration into SmartThings, and the TTS is one of those very handy things to have. Thanks in advance for any update or info you can provide here.

Still the same status. We have selected a TTS engine and are working on that. Thank you for your patience but once we get the details sorted out TTS will be permanent.

2 Likes

You can use Yonomi while ST is nailing this down. Is not as robust, but it gets (some) jobs done.

1 Like