D:\Python3.6\123\Scripts\python.exe D:/Python3.6/yuan/123/say/say1.py
Traceback (most recent call last):
File "D:\Python3.6\123\lib\site-packages\win32com\client\dynamic.py", line 81, in _GetGoodDispatch
IDispatch = pythoncom.connect(IDispatch)
pywintypes.com_error: (-2147221021, '操作无法使用', None, None)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:/Python3.6/yuan/123/say/say1.py", line 9, in
speaker = win32com.client.Dispatch("SAPI.SpVoice")
File "D:\Python3.6\123\lib\site-packages\win32com\client\__init__.py", line 95, in Dispatch
dispatch, userName = dynamic._GetGoodDispatchAndUserName(dispatch,userName,clsctx)
File "D:\Python3.6\123\lib\site-packages\win32com\client\dynamic.py", line 98, in _GetGoodDispatchAndUserName
return (_GetGoodDispatch(IDispatch, clsctx), userName)
File "D:\Python3.6\123\lib\site-packages\win32com\client\dynamic.py", line 83, in _GetGoodDispatch
IDispatch = pythoncom.CoCreateInstance(IDispatch, None, clsctx, pythoncom.IID_IDispatch)
pywintypes.com_error: (-2147221164, '没有注册类', None, None)
Python
(0)