I have a simple Python script that uses pyttsx3:
import pyttsx3 as tts
engine = tts.init()
voices = engine.getProperty('voices')
engine.setProperty("voice", voices[1].id)
engine.say("Hello")
engine.runAndWait()
However when I run it, the program immediately ends with this error:
Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)
And my MacBook tells me that Python quit unexpectedly.
I'm using PyCharm 2022.2.2 (Community Edition).
I've checked online but none of the solutions worked for me. The line causing the problem seems to be engine = tts.init()
. Please help me fix this problem. Thank you in advance.