jdlorimer/chinese-support-redux

Google TTS bulk fill sound causes error

Closed this issue · 1 comments

Describe the bug
Bulk fill sound with Google TTS causes error in Anki

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Chinese -> Bulk fill -> Sound (with a Google TTS selected as the speech engine'
  2. Click on 'Bulk fill sound.'
  3. Scroll down to 'n/a'
  4. See error

Expected behavior
Addon bulk fills sound.

Screenshots

Specs (please complete the following information):

  • OS: [e.g. Windows, iOS, Ubuntu]
  • Anki Version 2..1.38
  • Chinese Support Version v0.14.0

Additional context
Add any other context about the problem here.

ust took the update this afternoon. Getting the following Error with bulk fill sound on Google Mandarin PRC. Baidu works fine

Error
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.38 (355e4cd5) Python 3.8.6 Qt 5.14.2 PyQt 5.14.2
Platform: Windows 10
Flags: frz=True ao=True sv=1
Add-ons, last update check: 2021-03-26 14:11:49

Caught exception:
Traceback (most recent call last):
File "C:\Users\m\AppData\Roaming\Anki2\addons21\1128979221\fill.py", line 154, in bulk_fill_sound
s, f = fill_sound(hanzi, copy)
File "C:\Users\m\AppData\Roaming\Anki2\addons21\1128979221\behavior.py", line 169, in fill_sound
s = sound(hanzi, config['speech'])
File "C:\Users\m\AppData\Roaming\Anki2\addons21\1128979221\sound.py", line 51, in sound
return '[sound:%s]' % AudioDownloader(hanzi, source).download()
File "C:\Users\m\AppData\Roaming\Anki2\addons21\1128979221\tts.py", line 50, in download
self.func()
File "C:\Users\m\AppData\Roaming\Anki2\addons21\1128979221\tts.py", line 56, in get_google
tts.save(self.path)
File "C:\Users\m\AppData\Roaming\Anki2\addons21\1128979221\lib\gtts\tts.py", line 321, in save
self.write_to_fp(f)
File "C:\Users\m\AppData\Roaming\Anki2\addons21\1128979221\lib\gtts\tts.py", line 303, in write_to_fp
raise gTTSError(tts=self, response=r)
gtts.tts.gTTSError: 200 (OK) from TTS API. Probable cause: Unknown

This should be fixed as of version 0.14.2.

If still doesn't work for you, please reopen this ticket.