Google TTS once working now not

Strange one this, as TTS was working ok. Playing around trying to get Nest temp to be announced seems to have broken it, or the two are separate issues that just came together at the same time - i don’t know.

Here’s the error from the home assistant log;

(ERROR)

Sun Dec 02 2018 14:09:12 GMT+0000 (Greenwich Mean Time)

Error executing service <ServiceCall tts.google_say (c:dad704956a2c4b649be30c5a4f80cb0e): message=Temperature is 17.0., entity_id=[‘media_player.googlehome0643’]>

Traceback (most recent call last):

File "/usr/local/lib/python3.6/site-packages/homeassistant/core.py", line 1177, in _event_to_service_call

await service_handler.func(service_call)

File "/usr/local/lib/python3.6/site-packages/homeassistant/components/tts/init.py", line 137, in async_say_handle

options=options

File "/usr/local/lib/python3.6/site-packages/homeassistant/components/tts/init.py", line 306, in async_get_url

engine, key, message, use_cache, language, options)

File "/usr/local/lib/python3.6/site-packages/homeassistant/components/tts/init.py", line 318, in async_get_tts_audio

message, language, options)

File "/usr/local/lib/python3.6/site-packages/homeassistant/components/tts/google.py", line 83, in async_get_tts_audio

token.calculate_token, part)

File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run

result = self.fn(*self.args, **self.kwargs)

File "/usr/local/lib/python3.6/site-packages/gtts_token/gtts_token.py", line 28, in calculate_token

seed = self._get_token_key()

File "/usr/local/lib/python3.6/site-packages/gtts_token/gtts_token.py", line 57, in _get_token_key

tkk_expr = re.search(".?(TKK=.?;)W.*?", line).group(1)

AttributeError: ‘NoneType’ object has no attribute ‘group’

I’ve found some GitHub references to issues similar, but these are quite old now, so i’m not sure if the errors are linked. Boudewijn26 had a fix with some code change for HA 0.78.1. I’m running HA 0.81.6 and assuming fixes make it into version releases.

Update gtts_token.py by guydipietro · Pull Request #8 · Boudewijn26/gTTS-token · GitHub - possible fix?

Google borked something, there was a fix added in 0.83.2

You can either update, or there is a custom component floating around the forums if you search for google tts custom component, I am sure you will find it.

Thanks Cee.

I thought updating to 0.83.2 but it’s caused it to go offline and I can’t get it back up. It’s a love hate relationship with HA…and at the moment I hate it.

Goes off to search for unresponsive after 0.83.2 update :roll_eyes:

edit: name change.

Well, i’m up and running again after issue with owntracks causing HA front end not coming up and i’ve had a look at Google TTS again and i’m still struggling;

Log Details (ERROR)

Mon Dec 03 2018 22:37:51 GMT+0000 (Greenwich Mean Time)

Timeout for google speech.

Then, this error;

Log Details (ERROR)

Mon Dec 03 2018 22:37:51 GMT+0000 (Greenwich Mean Time)

Error on init TTS: No TTS from google for ‘Test Message, 1, 2, 3!’

Having a play with cache and base_url to see if these get it working again.

This is my Google TTS setup, running in a docker container,

tts:
  - platform: google
    cache: true
    cache_dir: /config/tts
    time_memory: 300
    language: 'en-uk'

Same as my settings Cee, which got me working again. :slight_smile:

1 Like

Hi Jacko,
What got you working again at the end?
Using settings like Cee or upgrading HA 0.81.6 to a more recent version?

i have the exact same issue as you have (well, had).
Thanks!
Eole