TTS, google home and Hassio not working (0.59.2)

Hi everyone. I just installed hassio in my pi and follow a few tutorials to have everything set properly (DuckDns, Let’s Encrypt Certificates, etc), but I found that the first thing that I tried once I finished all my settings failed, the TTS.

Settings:

  • Hassio 0.59.2 running on a Raspberry pi
  • DuckDns and Let’s Encrypt running.
  • Router with NAT loopback (all the testing were done from a mobile not connected to the same network to avoid the loopback, and from a web browser connected to the same network.
  • Google home mini detected as a media_player

What I tried

  • I checked that my configuration.yaml was right:

base_url:n https://my_domain.duckdns.org:8123
ssl_certificate: /ssl/fullchain.pem
ssl_key: /ssl/privkey.pem
api_password:!secret http_password

Some logging

2017-12-16 21:38:38 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=tts, service=google_say, service_data=entity_id=media_player.bedroom_speaker, message=This is the one that I have a few questions about the es una empresa dedicada a la venta de productos de la marca de agua y , service_call_id=1965512304-14>
    2017-12-16 21:38:39 INFO (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=media_player, service=play_media, service_data=media_content_id=https://mydomain.duckdns.org:8123/api/tts_proxy/3b6a5cce4f00631601d9395ea88d334a290dbc91_en_-_google.mp3, media_content_type=music, entity_id=['media_player.bedroom_speaker'], service_call_id=1965512304-15>
    2017-12-16 21:38:39 INFO (SyncWorker_5) [pychromecast.controllers] Not launching app CC1AD845 - already running
    2017-12-16 21:38:39 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_executed[L]: service_call_id=1965512304-15>
    2017-12-16 21:38:39 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_executed[L]: service_call_id=1965512304-14>
    2017-12-16 21:38:39 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=media_player.bedroom_speaker, old_state=<state media_player.bedroom_speaker=idle; volume_level=0.4699999988079071, is_volume_muted=False, media_content_id=https://home-assistant.io/images/cast/splash.png, media_position=0, media_position_updated_at=2017-12-16T21:38:27.763469+00:00, app_id=CC1AD845, app_name=Default Media Receiver, friendly_name=Bedroom speaker, supported_features=21437 @ 2017-12-16T21:38:26.926147+00:00>, new_state=<state media_player.bedroom_speaker=idle; volume_level=0.4699999988079071, is_volume_muted=False, media_content_id=https://home-assistant.io/images/cast/splash.png, media_position=0, media_position_updated_at=2017-12-16T21:38:39.463774+00:00, app_id=CC1AD845, app_name=Default Media Receiver, friendly_name=Bedroom speaker, supported_features=21437 @ 2017-12-16T21:38:26.926147+00:00>>
    2017-12-16 21:38:39 INFO (MainThread) [homeassistant.components.http] Serving /api/history/period/2017-12-16T21:38:29.777Z to 82.132.215.10 (auth: True)

I can hear the sound from off to Idle but after that nothing.

I tried using the hamburger menu and also by doing this from the Developer Tools -> Services

image

I think that I did not miss anything but if someone has any idea, or anything that I can try, it would be great.

Thanks

I also tried with another engines like microsoft and marytts, but both have the same result as the google one.

I also tried the same in my google chromecast but there was no sound there neither.

Hi,

I am getting the same issue I want on version 0.58.1 but even upgraded to 0.60 and still the same problem.

Did you find a solution?

I have read places that NAT Loopback may be the problem but as you I can access externally via https://name.duckdns.org and same outcome, so that puts a stop to that.

I wonder if it is something to do with certificates? or something to do with HomeAssistant not being able to pass to .mp3 to Google Home?

If you try to use the ‘Text to Speak’ in the Google Home media player menu in states screen and type some text to speak does a .mp3 get saved into the tts directory in your /config/tts folder?

I had a similar problem, both with wink and tts. I did finally get it working. I use a bit of a wierd setup, I have pfsense handling my routing and pihole providing my DNS. I also use two different domain names to reach my HA instance. From the reading I’ve done, was the root of some of my problem. I belive it has to do with the Chromecasts using the hard coded google dns servers 8.8.8.8, rather then my internal. It messes with the SSL handling.

So,

Using pfsense, after many many hours of messing around:

  1. Created local dns entries for external web services (so xxxx.duckdns.org resolves to 192.168.x.x)
  2. ensure all local clients were pulling the pihole dns and their dns server
    2.Redirect all DNS requests coming to pfsense to the local host https://doc.pfsense.org/index.php/Redirecting_all_DNS_Requests_to_pfSense
  3. Block all external dns requests
    So the effect is this, all external devices, no matter what dns try to use, get the local ip for the dns and thus SSL etc works nicely. As a side effect, my wink also started authenticating okay.

you would follow a similar pattern depending on your home router.

pro

Edit: Everything started to work when I dropped the :8123 !!!

I have rebuilt everything and it is definately to do with the SSL as when I disable as below, Google home says what I type in the Text to Speak menu.

http:
  # Secrets are defined in the file secrets.yaml
  api_password: !secret http_password
  # Uncomment this if you are using SSL/TLS, running in Docker container, etc.
  # base_url: example.duckdns.org:8123

  #base_url: xxxxx.duckdns.org:8123
  #ssl_certificate: /ssl/fullchain.pem
  #ssl_key: /ssl/privkey.pem

I do not think my router has NAT loopback I have the standard NBN modem Sagemcom F@st 5355 router which most of Australia has if on Telstra on the NBN, so is there anything else I can do???

Can I use any other TTS and play directly to Google Home?

1 Like

Google TTS not working for me using Hassio (0.60.1)

I got my Google Home Mini today and successfully integrated it into Hassio using the Google Assistant instructions. I can control switches and lights with voice commands.

I thought that I should be able to get an automation script to play a voice message over the Google Home Mini speaker.
I found the media_player.living_room_speaker entity and added it for display on the frontend.
I can turn the media_player off/on and change the volume.
When I try to send text to voice the service is called but no sound is heard.
I found the voice file (.mp3) in the tts folder but it is not being forwarded to media_player.living_room_speaker.

I tried base_url: example.duckdns.org:8123 in my configuration.yaml file with and without the :8123
It made no difference. I use DNSMASQ so that I can use example.duckdns.org:8123 on my internal network.
tts does not work on my iPhone IOS app over the cellphone LTE network either.

Running Hassio on a Raspberry PI 3 with a Non-NAT capable router.

1 Like

Thanks for the info, mine started to speak after follow your advise to drop off :8123 from my configuration.yaml

Thanks for the info, I removed mine :8123 from base url and everything works like a charm :slight_smile: