TTS options to get text to an Android device for speech

I'm on a Vera right now and I use Vera Alerts. Vera Alerts consists of an app that runs on the Vera, and another app that runs on an Android device which does the TTS using the installed voice. After having old phones and tablets plugged in for years at a time and having the batteries bulge, I installed android on a Raspberry Pi 3, and have this running with the now discontinued Ivona Amy voice. I have a special audio switch that when it detects audio, it switches all of my wall/ceiling speakers to input 1 and then plays the message over the whole house.

Is there an easy way for me to maintain this architecture with that same android device doing the TTS? Also, this is all happening on the local network, no need to send stuff up to google's messaging service and it works when my internet connection is down. I'd like to maintain that as well.

I think when I was testing Google Assistant Relay, I was able to get it to play on Google Assistant on my phone. Can't remember for sure if that's correct though. You can certainly use just a Rasberry Pi 3 running debian. Not sure if it's worth the effort to keep it running android unless there's a lot of other stuff going on there.

So many ways to do TTS. Internal Chromecast Integration in another. VLC Player, and the VLCThing driver is yet another. My personal favorite is Google Assistant Relay because that opens up devices that Google Assistant supports but HE does not at this time. So you create rules that send silent commands to Google Assistant and you can control them from HE. It's a very cool tool to have in your kit.

I do like the idea of running android on a pie for tasker though. Is that possible? Maybe just pick up another RPi 3. Keep one running Android and run Debian and Node.js on the other for Google Assistant Relay.

Tasker might be my answer here. There's a Tasker Network Event Server plugin that might work perfect for this.

I want to keep it all local and not have to rely on outside services. Also, I want to keep the Ivona Amy voice. Currently, the only other way to do that is to pay Amazon because they bought it and it's now part of the AWS tts service.

LANnouncer is ine option. There's a Hubitat driver for it plus an Android app. I've used it on a Fire and it usually worked well (sometimes a small delay if it had been sleeping, and obviously nothing if it wasn't running). I'm not sure if the TTS runs locally, but since it requires voices to be downloaded to the Android device, I'd assume so.

Do any local solutions have the ability to play a sound file before the TTS? I have star trek door sounds playing when a door is opened, and other sounds based on the type of alert. And, the front door plays a Seinfeld sound clip so I can come through the door like Kramer. That will never get old.

That is a great idea and I wonder if that could be an update to the already awesome Chromecast Integration app on HE. My understanding is that HE stores an audio file of the TTS and simply transmits that to the Chromecast device(s).

@mike.maxwell is that an accurate understanding of how the Chromecast Integration app works? If so, I would like to request the ability to upload an audio file in place of text to be sent to the speakers. I know you guys are working like crazy and probably have a nice long list of to-dos, but now I'm thinking of sound clips like @signal15 has. Btw, great job on the app. It was so easy to implement and it works great.

The cast devices already support using other media sources via the play track command. No need to upload them to the hub.

1 Like

But, can you play an audio clip easily, followed by the TTS?

Yes, you can. I just found the discussion with the details started here: 2.0.6 Chromecast / playTrack

This is awesome!

I put a new GA speaker in the bedroom yesterday and as I opened the door for the dogs this morning I remembered it was about 75% volume yesterday. It probably has a low WAF right now since she is still sleeping. Well what do you know, I can't find the master bedroom speaker on the network now. :pleading_face:

I am now setting up a custom rule to set the volume to a specific level before I play the TTS. I was trying to keep RM simple before so this is pushing me to dig in a little more.

1 Like

So how would one created a notification that plays a sound clip, and then plays the TTS. Ideally, it looks like it would be best to be able to put something like this in the text to speech box:

{{sound:}}{{delay:4s}}This is a test voice alert.

This would allow you to play the file, and set the delay to the TTS so it wouldn't cut off the playing of the sound file.

Who made this Chromecast plugin?

In the RM you can create a custom command. Set the attribute to actuator then you can pick your GA device.

Then you will see the options that you can use with the GA device.

I am by no means an expert at RM. I'm breaking it into multiple rules that call the custom commands then it calls the next rule and you can add delays in the rules.

Of course if someone has a more elegant solution then please chime in.

Chromecast Integration is a built-in app written by @mike.maxwell. Here's how to use it.

If you store a file on github, if it's made public, you can just put the url in for the string value and it will play from consistently as long as you have internet.

Can the chromecast integration app be used to get TTS to an android tablet with nothing else? I installed the Chromecast Integration (beta) app in HE and installed Google Home app on the tablet but it is not found when I run the discovery in HE. What am I missing to get the tablet discovered (Galaxy Tab s4)? There is no app called "chromecast" in the app store and Ive never used chromecast for anything before so I dont really know what Im dealing with.

Nope. You need a chromecast device or a Google home.

1 Like