我通常在网站重新编码。
import pyttsx
engine = pyttsx.init()
def speak(text):
engine.say(text)
engine.runAndWait()
speak("hello guys")
但它将错误显示为
Traceback (most recent call last):
File "python", line 5, in <module>
OSError: libespeak.so.1: cannot open shared object file: No such file or
directory