Suggestions for speakers, etc. for announcements

@jtmpush18 can you please take a quick look at my TTS requirements above (no cloud access, no smart speakers, hardwired (i.e., speaker wire) dumb analog/audio speakers all driven simultaneously for an announcement, etc.) and comment on whether or not your TTS app is a solution? I don't fully understand what your app can do based on the app's page. TIA.

Have you tried this after blocking wan access to the Symfonisk speaker?

This will require a server (e.g. Raspberry Pi, etc.), connected to a Speaker.
It uses built in linux commands to drive text to speech on that speaker, with a simple interface to Hubitat.
The server could be something as small as a Raspberry Pi Zero.

1 Like

I recently bought a rPi 4 (8GB RAM, 128GB storage) to do a POC for Scrypted. I'm finished with that, and probably won't implement Scrypted for a while, so I assume I can use the rPi to do a POC on your TTS solution.

The rPi has a headphone jack, so if I can get sound out of the rPi (based on the text fed to your driver) to headphones, that would be a good start. Then I need to get the headphone jack audio output into a monaural amp that has speakers connected to it for the final POC.

I have done part of the stuff for the @jtmpush18 solution... espeak works on the rPi. I can hear the espeak generated audio via headphones plugged into the headphone jack. The HE app is installed and I created a rule to use it. I'm struggling with the rest of the linux stuff (the steps under the topic "Linux server side"), so I don't have that working yet. I'm at best a little more than a novice linux person, so I'm not sure what to do based on the instructions.

I don't want to get sidetracked, but now I'm wondering if I really need TTS, i.e., is the ability for HE to drive a linux app to play an audio file good enough for my situation. For example, from an HE rule, instead of driving the espeak CLI with a text string, can I drive the linux aplay cli with a file name? Is there an HE driver that can do this?

That seems like overkill for what seems to be a really simple task, i.e., driving aplay via the CLI on a rPi. Plus, I would rather not add another piece of hardware to the mix if I can instead do this on the rPi I already have.

Linux server stuff:

As root clone this repo to a working directory (I used the PI's home directory).

- Change your userid to "root" (one way to do this is SU -).
- Use the "git clone" command to copy a github repsitory down to your Linux device. For details see:
git clone | Atlassian Git Tutorial

from a terminal, cd to the directory and run "npm install". This should install all the necessary components.

- This is a command for node.js to install everything.

see if it runs via "node app.js", leave it running.
1 Like

Here's where I'm at on this topic...

With some help from @jtmpush18 (my Linux knowledge is a bit lacking), I was able to get his app installed and working on my rPi, i.e., I can send a text message from his HE device driver to the rPi and hear the speach in headphones plugged into the rPi. Response time is very fast, probably sub-second. The voice is very robotic, but there are other voices that can be used that are probably better. I'm pretty confident that I can feed the rPi line-out signal to a stereo-to-mono converter to a small amp to multiple speakers around the house. I plan on bench testing that part later this week.

There's also other open source local TTS apps available that supposedly have better voices. At some point, I will try to modify the driver to use those apps on the rPi. Also, I want to try something like "Linux aplay" on the rPi from a CLI by passing it the name of a wav file. As I mentioned a couple of days ago, driving wav files may be a better solution for me if I don't have too many to record.

1 Like

If your Pi has a Bluetooth radio, you can potentially use a Bluetooth solution for this. I have used the eSpeak method to send TTS to BT speakers.

3 Likes

I have done a TTS from Hubitat -> Amazon Polly->Mqtt->Linux and/or OSX One thing you will have to deal with is the flakiness of all those processes. For example the power goes out and the raspberry won't reboot (they don't). Or the process on the PI doesn't start or the the Bluetooth speaker is offline when the Pi want's to connect. Even after you learn all about PulseAudio and the newer Pipewire you might still fall into ALSA based commands for your scripts. While my system can work for me, I don't use it because something is always broken when you need it.

Echo Speaks works better, fails less often and the echo dots are very inexpensive.

2 Likes

I don't think that solution meets the "100% local" requirement.

It does.

2 Likes

I do run a Deepspeech derived TTS on a Nvidia 3060 GPU because pi4 wasn't faster enough to be 100% local. I've tried projects that claim the Pi4 can do real time TTS. They didn't for me.

I tested Apple Air Play with a HomePod mini. It worked, but there are issues that I don't want to live with.

It had a several second delay (even with cached messages being played multiple times). I need four or five speakers, so price becomes an issue ($100 each vs $10 each for a dumb wired 3" speaker). I wasn't able to figure out a way to make them all play a message simultaneously. They need power, so speaker placement is somewhat restricted. I want speakers that are inconspicuous, i.e., in-wall or in-ceiling.

I do run a Deepspeech derived TTS on a Nvidia 3060 GPU because pi4 wasn't faster enough to be 100% local. I've tried projects that claim the Pi4 can do real time TTS. They didn't for me.

I only did a few simple tests driving eSpeak from HE rules. They were less than 10 words each, which is similar to what my notifications will be. Response time was subsecond on my rPi 4.

If you want in wall speakers (and price is no problem), then you can go with Sonos amps. Hubitat sees them perfectly, and response time is subsecond.

I.e., you are a bachelor. :wink:

2 Likes

I am not a bachelor.
I just finished an installation with 6 Sonos amps and the speakers throughout the house.

p.s. I just checked eBay and used Sonos amps (first version) can be had for very reasonable prices.
I assume that the Hubitat / Sonos integration will work with the "connect" version of the amp.

2 Likes

There are of course many subjective interpretations of "reasonable" and the ROI of multi-speaker install. :slight_smile:

1 Like

The costs (price and time) go up dramatically for 100% local solutions if you decide espeak isn't good enough.