How can I fix this gTTS issue?

Viewed 57

I have the following code with gTTS

from gtts import gTTS
obj = gTTS(text = "Hello there", lang = 'en')
obj.save("hello.mp3")

For some reason, however, (I'm using version 2.2.3, python 3.7.3) it was working just fine a few days ago on my raspberry pi 4 Model B and it suddenly stopped again. I fixed it before by upgrading to a newer version (2.2.3 in my case), but it worked for a few months and now I'm having the same issue with it as before - when saving the mp3 file it takes too much time, whereas when it was working fine it took no more than a second (now it needs at least a minute or more), before you say it, it is not due to my internet connection. I've tried everything on the internet and I can't seem to find a solution that works 100% forever, on windows it works just fine and the mp3 file is saved instantly (same gTTS version), but on rpi it takes too much time when it should take no more than a second (and it worked that way until it magically stopped a few days ago).

0 Answers
Related