我找到了语音模块,我可以让我的电脑说出我写的东西。但问题是当我从这里尝试示例代码时:http: //pypi.python.org/pypi/speech/0.5.1它给了我一个错误并且不能这样做。这是我得到的错误:
Traceback (most recent call last):
File "<pyshell#1>", line 1, in <module>
response = speech.input("Say something, please.")
File "build\bdist.win32\egg\speech.py", line 162, in input
listener = listenforanything(response)
File "build\bdist.win32\egg\speech.py", line 193, in listenforanything
return _startlistening(None, callback)
File "build\bdist.win32\egg\speech.py", line 222, in _startlistening
context = _recognizer.CreateRecoContext()
File "C:\Python26\lib\site-packages\win32com\gen_py\C866CA3A-32F7-11D2-9602-00C04F8EE628x0x5x4.py", line 2648, in CreateRecoContext
ret = self._oleobj_.InvokeTypes(10, LCID, 1, (9, 0), (),)
com_error: (-2147352567, 'Exception raised.', (0, None, None, None, 0, -2147200905), None)
我真的希望有人能帮助我。
非常感谢提前,
杰克