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;


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/", line 1177, in _event_to_service_call

await service_handler.func(service_call)

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


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

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

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

message, language, options)

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

token.calculate_token, part)

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

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

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

seed = self._get_token_key()

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

tkk_expr =".?(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 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,

  - 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).