gTTS text to speech support

Hello all,

since a short time I get the following error when using the Addon gTTS text to speech support. I already deleted and reinstalled gTTS text to speech support but the error remains. I hope I get help here.

An error occurred. Please start Anki while holding down the shift key, which will temporarily disable the add-ons you have installed.
If the issue only occurs when add-ons are enabled, please use the Tools > Add-ons menu item to disable some add-ons and restart Anki, repeating until you discover the add-on that is causing the problem.
When you’ve discovered the add-on that is causing the problem, please report the issue on the add-on support site.
Debug info:
Anki 2.1.35 (84dcaa86) Python 3.8.0 Qt 5.14.2 PyQt 5.14.2
Platform: Windows 10
Flags: frz=True ao=True sv=1
Add-ons, last update check: 2020-11-09 20:21:07

Caught exception:
Traceback (most recent call last):
File “aqt\”, line 87, in on_closures_pending
File “aqt\”, line 59, in
File “aqt\”, line 238, in
File "C:\Users\ingob\AppData\Roaming\Anki2\addons21\391644525_init
.py", line 164, in _on_done
File “concurrent\”, line 432, in result
File “concurrent\”, line 388, in _get_result
File “concurrent\futures\”, line 57, in run
File “aqt\”, line 238, in
File "C:\Users\ingob\AppData\Roaming\Anki2\addons21\391644525_init
.py", line 160, in _play
File “C:\Users\ingob\AppData\Roaming\Anki2\addons21\391644525\vendor\gtts\”, line 295, in save
File “C:\Users\ingob\AppData\Roaming\Anki2\addons21\391644525\vendor\gtts\”, line 251, in write_to_fp
prepared_requests = self._prepare_requests()
File “C:\Users\ingob\AppData\Roaming\Anki2\addons21\391644525\vendor\gtts\”, line 194, in _prepare_requests
part_tk = self.token.calculate_token(part)
File “C:\Users\ingob\AppData\Roaming\Anki2\addons21\391644525\vendor\gtts_token\”, line 28, in calculate_token
seed = self._get_token_key()
File “C:\Users\ingob\AppData\Roaming\Anki2\addons21\391644525\vendor\gtts_token\”, line 58, in _get_token_key
raise ValueError(
ValueError: Unable to find token seed! Did change?

Many thanks, Ingo

It seems that Google has updated and switched to another way of generating speech.
This issue is currently open on GitHub. Further information you’ll find here:

There is also a workaround provided that works fine for me.

In file I replaced line #160


  # Workaround to avoid error in save function
        while True:
                print('got the issue '+str(count))
        # The following line was there before

Regards, Ingo

Thanks for posting your workaround. I’d recommend adding a limit on the count, or you could end up waiting forever if it stops working completely. You may also want to consider switching over to the AwesomeTTS add-on, as I believe it supports native Anki TTS tags now, and it is better supported.

Hi Damien,

Many thanks for the tip. I do not have any problems with it yet but I will take it into account.
I have tried the AwesomeTTS addon in the past and was not so happy with it. I hope there there will be a fix soon.

Regards, Ingo

This workaround doesn’t work for me. I also removed and installed again add-on but no success.

This topic is closed:

I found something like this in Arch repo:
should I install it?