I recently re-built my setup and moved to hosting all my HA related stuff in Docker. This has mostly been great, though I’m still ironing out a few issues. One of these is that my TTS announcements no longer work due to PicoTTS not being available in the Docker image.
As I see it there are a couple of options to fix this:
Build a custom HASS image based on the official one, but including PicoTTS
Install another local TTS option (ideally via Docker), such as MaryTTS that would be available over the network
I’m not all that enthused about option 1 due to the need to re-build the image for every new HASS release. Option 2 just adds another thing to maintain.
Has anyone got any other ideas? Has anyone found another way to get PicoTTS working inside the Docker container?
(Note: I’m not at all interested in non-local i.e. cloud based TTS, hence why it’s not included in the list. Please don’t suggest this as an alternative ).
I use a marytts container. I’m not sure what you mean by ‘another thing to maintain’ but it’s just a few lines in my docker-compose and forget about it.
I mean, by following robconnolly’s detailed instruction, I managed to spin up the marytts docker. It kind of worked because I can log onto 192.168.1.8:59125 and there is a web page which I can press test button to test things out.
when I tried to actually use it in home assistant, I am a bit stuck.
I have an Alexa speaker, but i haven’t set up my HA for the Internet yet, and the whole point of using marytts is to cut the Internet dependency, no?
I have an old Sonos speaker which no one is using, ideally that is something I can use. But apparently the default lovelace widget is not working. i.e I can input a text, but nothing came out of it. but when i look at the config/tts directory, the wav_file is there.
Yes, I integrated marytts to the tts component to the configuration.yaml file. there isn’t much to it and I don’t think I made any mistake:
The MaryTTS thing appears to be broken. I was previously using it with the browser_mod extension which created media players for connected browsers, but a change a few versions back broke it.
@kngharv I opened the GitHub issue 32142 linked above, and had started a forum thread here. There are a couple of ideas in that thread for ways to get around the MaryTTS issue, by using PicoTTS or editing a Python file. I can’t edit the Python file because I’m using HA Supervised. I’m hoping the MaryTTS issue gets fixed sooner or later.
I actually looked at PicoTTS first before I wonder to MaryTTS.
PicoTTS require native libraries. Since I am using docker and using the official docker image, the only hack I can do is to create a new docker image with built-in PicoTTS in it. It is not hard to do, just that it is not sustainable in the long run.
Thanks for your answer. I guess I just have to wait, while may be try to build a new image myself. I am new to docker thing and it will take me a bit longer to figure it out.
I was able to make marytts work with two one line changes to the tts component and the marytts component. I wonder if both of these can be copied out as custom_components and modified to override the current versions? I left some notes in that first github issue I referenced a couple of comments back.
I have filed a formal feature request to bake picotts native library into the home assistant docker image itself so all we have to do is add picotts into the configuration.yaml file and do nothing else.
By having such library built-in, home assistant will have a text-to-speech feature that doesn’t require any cloud services.
Since picotts is relatively small, mature, and already being ported to various different types of computers, it is relatively easy for the developer to do this.
If you want a off-line text-to-speech feature baked into home-assistant, please go to the website and vote for such feature to get developers’ attention: