I was having some problems when using the .getproperty(\'voices\') attribute in pyttsx3. So I decided to uninstall it and then re-install it using PIP to see if that may fix the
Try instead this:
engine= pyttsx3.init('dummy')