Hello Everyone,
I have been running TTS on my google home for door status notifications. It has been working well. However, few hours ago just TTS stopped responding! I did not make any changes to HA or any components recently except I updated the HA to 78.0 last night. Please see the error msg below from HA logs and my config.
Any thoughts? Please help me out!
Error executing service <ServiceCall tts.google_say (c:c8624389c43942a29c59a80941921a22): entity_id=[‘media_player.living_room_speaker’], message=hi>
Traceback (most recent call last):
File “/usr/local/lib/python3.6/site-packages/homeassistant/core.py”, line 1127, 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 62, in _get_token_key
a = re.search(“a\\x3d(-?\d+);”, tkk_expr).group(1)
AttributeError: ‘NoneType’ object has no attribute ‘group’
Config:
tts:
platform: google
cache: true
cache_dir: /tmp/tts
time_memory: 300
I’m seeing the exact same issue. Added a new tts google_say phrase to node-red this morning and it would not be spoken. I made the mistake of cleaning out the cache and every phrase is coming back with the Error executing service <ServiceCall tts.google_say and AttributeError: ‘NoneType’ object has no attribute ‘group’
I’m on 0.76.2. No recent upgrades taken. Restarted HASS several times, rebooted pi3 it’s hosted on once.
I have the same problem since yesterday with my GassistPi Google Home running on my Raspberry Pi, Google TTS will not respond to anything even when ran manually. Here is the error message from my Pi.
ON_CONVERSATION_TURN_STARTED
ON_CONVERSATION_TURN_STARTED
ON_END_OF_UTTERANCE
ON_END_OF_UTTERANCE
ON_RECOGNIZING_SPEECH_FINISHED:
{“text”: “turn the lights on”}
ON_RECOGNIZING_SPEECH_FINISHED:
{“text”: “turn the lights on”}
Traceback (most recent call last):
File “/home/pi/GassistPi/src/main.py”, line 194, in
main()
File “/home/pi/GassistPi/src/main.py”, line 177, in main
Action(str(usrcmd).lower())
File “/home/pi/GassistPi/src/actions.py”, line 846, in Action
say(‘Turned on all the lights.’)
File “/home/pi/GassistPi/src/actions.py”, line 91, in say
words= translator.translate(words, dest=language)
File “/home/pi/env/lib/python3.5/site-packages/googletrans/client.py”, line 172, in translate
data = self._translate(text, dest, src)
File “/home/pi/env/lib/python3.5/site-packages/googletrans/client.py”, line 75, in _translate
token = self.token_acquirer.do(text)
File “/home/pi/env/lib/python3.5/site-packages/googletrans/gtoken.py”, line 180, in do
self._update()
File “/home/pi/env/lib/python3.5/site-packages/googletrans/gtoken.py”, line 59, in _update
code = unicode(self.RE_TKK.search(r.text).group(1)).replace('var ', ‘’)
AttributeError: ‘NoneType’ object has no attribute ‘group’
I fixed it by switching to pico2wave temporarily by adding this code and commented out the gTTS code. It doesn’t sound as good as Google Text to Speech though.
##Speech and translator declarations
#ttsfilename="/tmp/say.mp3" #translator = Translator()
#language=‘en’
There is a thread of others experiencing this problem over on the gTTs git - https://github.com/pndurette/gTTS/issues/60. Sounds like this could just be a google problem from previous messages in the thread but I don’t know.
Hi Edif30,
Thank you for creating an issue. I see from the other thread that it is fixed. I run hassioand so may I know how to update gTTS-token or what I need to do to get it work?
I have exactly the same issue, feels like something happened to tts and google home after upgrade to 0.78. In 0.78.1 it stopped working completely.
However it works from the Google Home card.
Well, I’m still facing issues after updating to 78.3. However, this time the errors are different. Please see the errors I get every time when I call TTS. On this regard, I did some search and it looks like several folks have been facing this issue. I tried few of the resolutions suggested such as remove https:// , port number and both at base_url. However, none saved me!
Platform cast not ready yet. Retrying in 120 seconds.
> Error doing job: SSL handshake failed
> Traceback (most recent call last):
> File "uvloop/handles/stream.pyx", line 609, in uvloop.loop.UVStream._on_eof
> File "uvloop/sslproto.pyx", line 171, in uvloop.loop._SSLPipe.feed_ssldata
> File "/usr/local/lib/python3.6/ssl.py", line 689, in do_handshake
> self._sslobj.do_handshake()
> ssl.SSLError: [SSL: HTTP_REQUEST] http request (_ssl.c:841)
> Error doing job: SSL error errno:1 reason: HTTP_REQUEST
> Traceback (most recent call last):
> File "uvloop/sslproto.pyx", line 504, in uvloop.loop.SSLProtocol.data_received
> File "uvloop/sslproto.pyx", line 204, in uvloop.loop._SSLPipe.feed_ssldata
> File "uvloop/sslproto.pyx", line 171, in uvloop.loop._SSLPipe.feed_ssldata
> File "/usr/local/lib/python3.6/ssl.py", line 689, in do_handshake
> self._sslobj.do_handshake()
> ssl.SSLError: [SSL: HTTP_REQUEST] http request (_ssl.c:841)
Thank you for the reply Kanga_who! It was my mistake. When we had this TTS issue, I was editing the configuration for TTS and forgot to remove the base_url under TTS. After I removed the base_url, it worked like a charm! Thank you once again!
Looks like something has changed on TTS from Google end. I’m unable to get TTS working. I do not recall on anything that had changed recently! Does anyone have this issue with the errors like below?
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)