。。。
1. 引
话说最近容易失眠,所以想写一个催觉的程序。想来想去,还是用了pyttsx3。
于是,首先安装pyttsx3。(Win10)
首先在cmd中输入:
pip install pyttsx3
安装完毕。
在python中import pyttsx3
一切都如此顺利。对于pyttsx3的用法这里不再叙述。但当
engine = pyttsx3.init()时,灾难降临了。。
>>> engine = pyttsx3.init()
Traceback (most recent call last):
File "C:\Users\Q宝\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pyttsx3\__init__.py", line 20, in init
eng = _activeEngines[driverName]
File "C:\Users\Q宝\AppData\Local\Programs\Python\Python38-32\lib\weakref.py", line 131, in __getitem__
o = self.data[key]()
KeyError: None
During handling of the above exception, another exception occurred:
Traceback (most recent call last)