源代码
import pyttsx3
engine = pyttsx3.init()
engine.say(‘Sally sells seashells by the seashore.’)
engine.say(‘The quick brown fox jumped over the lazy dog.’)
engine.runAndWait()
好像别人的电脑能运行成功但是我的运行不了 不知道是不是电脑的问题 我的电脑是华为 win10
===================== RESTART: C:\Users\cai\Desktop\ss1.py =====================
Traceback (most recent call last):
File “D:\Python\lib\site-packages\pyttsx3_init_.py”, line 20, in init
eng = _activeEngines[driverName]
File “D:\Python\lib\weakref.py”, line 137, in getitem
o = self.datakey
KeyError: None
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “D:\Python\lib\si