语音库安装

2024-04-19 10:02:57 发布

您现在位置:Python中文网/ 问答频道 /正文

我是Python新手,我安装了^{}库。但是每当我从pythonshell导入speech时,它都会给出错误

>>> import speech
Traceback (most recent call last):
  File "<pyshell#0>", line 1, in <module>
    import speech
  File "C:\Python34\lib\site-packages\speech-0.5.2-py3.4.egg\speech.py", line 55, in <module>
    from win32com.client import constants as _constants
  File "C:\Python34\lib\site-packages\win32com\__init__.py", line 5, in <module>
    import win32api, sys, os
ImportError: DLL load failed: The specified module could not be found.

Tags: inpyimportlibpackageslinesitespeech
2条回答

speech库要求您安装pywin32,如自述文件的requirements section所述:

Requires Windows XP or Vista, and Python 2.4 or 2.5. If you use Windows Vista, you'll need to say "start listening" if Speech Recognition is not awake.

In addition to easy_installing speech.py, you'll need pywin32 (for Python 2.5 or for Python 2.4); and if you're on XP, you'll need the Microsoft Speech kit (installer here).

因此,在尝试导入speech之前,请下载并安装pywin32。在

您需要安装pywin32。在

使用easy_install pywin32或{}

相关问题 更多 >