I am trying to create a translator with tkinter
, pyttsx3
and googletrans
. It will translate English to Spanish and talk to you, but I keep getting the following error:
code = self.RE_TKK.search(r.text).group(1).replace('var ', '')
AttributeError: 'NoneType' object has no attribute 'group'
This is my code that might be creating the problem:
def speaking_sound():
engine = pyttsx3.init()
traslator = Translator()
out = traslator.translate(my_entry.get(), dest='es')
engine.say(out)
engine.runAndWait()
Please help!