。。。
1. 引
话说最近容易失眠,所以想写一个催觉的程序。想来想去,还是用了pyttsx3。
于是,首先安装pyttsx3。(Win10)
首先在cmd中输入:
pip install pyttsx3 1
安装完毕。
在python中import pyttsx3
一切都如此顺利。对于pyttsx3的用法这里不再叙述。但当
engine = pyttsx3.init()时,灾难降临了。。
>>> engine = pyttsx3.init() Traceback (most recent call last): File "C:UsersQ宝AppDataLocalProgramsPythonPython38-32libsite-packagespyttsx3__init__.py", line 20, in init eng = _activeEngines[driverName] File "C:UsersQ宝AppDataLocalProgramsPythonPython38-32libweakref.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)12345678910