Something going on with my TTS setup

Not sure where to start… First post, and have some questions about whether or not TTS is working properly with my setup. i am running 0.71.0, and i have tts enabled. I noticed when i go to the services page and manually try to send text data to any of my chromecast devices, nothing happens. i can stream to them normally (music from non HA apps), and from HA i can hear the chime when I press the power button on the corresponding tile for that particular chromecast media player. I just can not get tts to load.
HA logs say that tts was loaded no issue…

Please note…

2018-06-19 11:44:56 ERROR (MainThread) [homeassistant.config] Invalid config for [script]: expected a dictionary for dictionary value @ data[‘script’][‘alias’]. Got ‘Jarvis Greeting’
expected a dictionary for dictionary value @ data[‘script’][‘sequence’]. Got [OrderedDict([(‘service’, ‘tts.google_say’), (‘data’, OrderedDict([(‘entity_id’, ‘media_player.nonis_mini’), (‘message’, ‘Hello from Home Assistant’)]))])]. (See /home/homeassistant/.homeassistant/configuration.yaml, line 246). Please check the docs at https://home-assistant.io/components/script/

and

2018-06-19 11:44:56 INFO (MainThread) [homeassistant.loader] Loaded tts from homeassistant.components.tts
2018-06-19 11:44:56 INFO (MainThread) [homeassistant.loader] Loaded tts.google from homeassistant.components.tts.google
2018-06-19 11:45:04 INFO (MainThread) [homeassistant.setup] Setting up tts
2018-06-19 11:45:04 INFO (Thread-2) [homeassistant.components.tts] Create cache dir /tmp/tts.
2018-06-19 11:45:10 INFO (MainThread) [homeassistant.setup] Setup of domain tts took 6.7 seconds.

My config.yaml looks like this…

tts:

  • platform: google
    cache: true
    cache_dir: /tmp/tts
    time_memory: 300

This is the setup I have for my TTS, I don’t actually use it for anything yet, but I know it works from the script running, so maybe it can help you out.

In my configuration.yaml just a simple setup,

# Text to speech
tts:
  - platform: google

and then in scripts.yaml I have it set the volume first, and then announce the TTS message.

black_bin_tts:
  alias: Black Bin Speach
  sequence:
  - data:
      entity_id: media_player.kitchen_speaker
      volume_level: 0.15
    service: media_player.volume_set
  - data:
      entity_id: media_player.kitchen_speaker
      message: '''Have you taken the black bin out ?'''
    service: tts.google_say

Hopefully you can work something out from that.

Thanks Cee! I’ll give it a try. backing out of those extra options in the configuration.yaml entry may help. I’ll let you know.

One thing i noticed is if i manually type something in the speakers media tile, i see the following entry in the logs…

2018-06-19 14:38:35 ERROR (MainThread) [homeassistant.core] Error executing service <ServiceCall tts.google_say: entity_id=[‘media_player.nonis_mini’], message=Hello World>
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/core.py”, line 1007, in _event_to_service_call
await service_handler.func(service_call)
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/tts/init.py”, line 134, in async_say_handle
options=options
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/tts/init.py”, line 300, in async_get_url
engine, key, message, use_cache, language, options)
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/tts/init.py”, line 313, in async_get_tts_audio
message, language, options)
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/tts/google.py”, line 77, in async_get_tts_audio
websession = async_get_clientsession(self.hass)
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/aiohttp_client.py”, line 38, in async_get_clientsession
hass.data[key] = async_create_clientsession(hass, verify_ssl)

I’m a newbie, so some help making sense of this would be greatly appreciated

I am new as well I am afraid, and still finding my feet, so logs don’t make much sense to me, hopefully someone else will be along to help.

Maybe just try pasting in my code, and change the media player entity to just see if the basic’s work, if they do, then start modify. As above though, if not, I am sure someone with a lot more knowledge will be along as some point.

The changes to the tts component did not work. I then found this article…
Frontend error on logfile? and tried removing deps folder. It was harder to find since i am running venv, and deleted the wrong folder. this lead ne to replace the pip, and homeassistant modules under the pythin folder, and reinstall home assistant. I can now manually trigger TTS to all chromcast devices, and will continue working on, and testing scripts.

1 Like