Revisiting local TTS speaker options

I've not dabbled much with this topic yet but I did try Google Home devices which was great, in concept, since it can do real TTS straight from hubitat........ but I gave up n it since it's so unreliable where the GH device would stop working for a while and then all of a sudden speak all the unspoken alerts sent to it - as if everything queued and was played at the same time. I found out that this was a known issue and perhaps still an issue till today (?)

Currently using Amazon Echo devices but I it's tedious to setup and still requires internet to work.

So now I'm in search again for a low cost local wifi speaker that can act as a TTS device for hubitat. The goto recomendation SONOS are expensive so it's out of the question!

My main question is, how does this TTS thing (hubitat -> to -> speakers) work? Does the Wifi speaker need to have HTTP server/api built in to receive the TTS commands? Do any DLNA or chromecast enabled wifi speaker work with hubitat? Or what feature must the speaker have for it to work with hubitat? (LOCALLY of course)

How bout this wifi Speaker?

Another solution I'm looking at is using an android phone + app to act as speaker

I know that there are TTS apps with HTTP server + api that can work nicely w/ hubitat

So what's the better approach?

HUBITAT ---> ANDROID DEVICE ---- (wifi) ----- wifi DLNA devices?

or

HUBITAT ---> ANDROID DEVICE ---- (wired audio output ) ----- any speaker with audio input ?

Finally I'm also looking at developing an arduino or raspberryPi based solution and be done with. But of course, I would like a ready-made and production solution.

PS
Alternatively, if TTS is complex and heavy , I dont mind substituting with pre-recorded mp3 or wav files and simply playback the specific one when a condition / rule is hit. - will the latter be better over-all?

1 Like

Of course, if you have a RPI (or similar Linux box), you can use the following for an out of the box TTS solution:

(You can use any speaker attached to the RPI)

3 Likes

ICYMI - The IKEA Symfomisk speakers are made by Sonos, work great with Hubitat's built-in TTS feature, and are much lower cost than traditional Sonos speakers.

I also want to make sure it is clear how Hubitat's TTS feature works. When a TTS request is made, the TEXT is transmitted to Amazon's Polly TTS engine in the cloud. An audio file is returned and is cached on the Hubitat hub. A link/url to this audio file is then transmitted to the Sonos speaker to be played. If the exact same TEXT is requested for TTS again, then the locally cached audio file is reused to avoid the hop to the AWS cloud.

This differs from using Echo Speaks, where the text is actually sent to Amazon's Alexa/Echo web interface. Echo Speaks essentially uses an API that is not really published or intended for the exact purpose it is being used. Thus, the extra work of keeping a cookie updated and valid to prevent cookie expiration problems roughly every 14 days.

4 Likes

Wow.. so there's no true way to have local TTS for hubitat even w/ Sonos? I thought TTS conversion was handed off and done by Sonoss internal TTS engine or something.

If this is the case then the real/true local TTS way is via Apps or RPI with http+api server... and none of the smart, wifi, or dlna speakers will work at all if completely offline..

But realizing, I could of course just run all the TTS once to cache all of em..... before completely disconnecting the system from the internet. The question now is

  1. how long will hubitat hold on to these cached MP3 files?
  2. How many TTS data (mp3 files basically) can hubitat keep before it impacts performance?

PS
I'd still like to know if any DLNA/Chromecast devices work with hubitat's speak / tts feature..

1 Like

Not exactly pocket change, but IKEA Symfonisk is $99 right now. SONOS guts. This model does not have a microphone for voice assistant, so it is output only (speaker + TTS).

1 Like

If you have a always on computer you could run a media server like Owntone, to play audio files.

2 Likes

Tnx for the suggestion
But i still want to know what makes this sonos speaker work w/ hubitat's TTS, what specification? the DLNA? because if so I could then find even cheaper wifi speakers w/ the same spex that works, like the Edifier ones.. but then again if SONOS has something unique like an internal TTS engine or an HTTP Server/Api then that's different.

I understand you want local. Not easy or inexpensive. Easy is Amazon Alexa routines to speak pre selected text based on a virtual switches.

That's what I did back in the SmartThings days: LANnouncer on an old Android phone for a completely local TTS solution.

Have you looked at the Fully Kiosk Browser integration as an Android phone + app solution?

There is - look at the suggestion made by @jtmpush18, which I have linked to again below:

You can use that mechanism to dynamically generate a wav or mp3 file with the desired TTS, and then push it to Sonos - all done locally. It is also very fast.

I've not, but

  1. is it stable/reliable?
  2. Is it truly offline or will it still need to be online?

As stable as the hardware that you run it on.

100% offline.

1 Like

hmm sounds complicated .. i mean if i'm going to use an RPI anyway, I was thinking I wouldn't need an HE driver anymore .... the RPI could have an HTTP API listening all the time and then do local TTS on it and output to a speaker attached to it.

Then on HE side, I'd simply call HTTP url with the parameters needed ... again, no need for HE driver since it's built-in action..... or am I missing something here?

The HE driver makes a regular notification device.

1 Like

hmm alright, will explore..

I would still love an answer to this though

"But i still want to know what makes this sonos speaker work w/ hubitat's TTS, what specification? the DLNA? because if so I could then find even cheaper wifi speakers w/ the same spex that works, like the Edifier ones.. but then again if SONOS has something unique like an internal TTS engine or an HTTP Server/Api then that's different."

Sonos has an extensive, documented, local API for various functions. I believe Hubitat makes use of this. Here's a link to the Sonos API:

https://developer.sonos.com/reference/control-api-list/

1 Like

ok, i was afraid of that

so besides this, not any WIFI speaker with DLNA or Chromecast can work .. :frowning:

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.