aash29 / pyspeech

Automatically exported from code.google.com/p/pyspeech
0 stars 0 forks source link

ImportError: DLL load failed: win32api, sys, os #23

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Installed easy_install, set its path variable(C:\Python25\Scripts), installed 
the .egg by opening cmd from C:\Python25\Scripts, executing the command 
"easy_install speech-0.5.2-py2.5" (because that command didn't work from 
anywhere else, even after setting the PATH variable as mentioned above)
Tried "import speech" and got some win32com error.. I saw the instructions 
again, realised i didn't have pywin32.
And so i installed "pywin32-216.win32-py2.5.exe", just click click click.. done.

2. tried "import speech" on Python Shell. Worked. Arighty! *Le me happy*

3. Copied the first program on Project Home :
##################
import speech

while True:
    phrase = speech.input()
    speech.say("You said %s" % phrase)
    if phrase == "turn off":
        break
##################

and executed it, and got this:

###################################
Traceback (most recent call last):
  File "C:\Python25\speech\myPyListener.py", line 1, in <module>
    import speech
  File "C:\Python25\lib\site-packages\speech-0.5.2-py2.5.egg\speech.py", line 55, in <module>
  File "C:\Python25\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.
###################################

What version of the product are you using? On what operating system?

I'm using python python 2.5.4 (i also have python 2.7.2 but in your project 
page it said python 2.4 or 2.5 so i'm using 2.5)
My OS is Windows Vista Home Premium SP1 32 bit, with SR already installed. I 
mean i get that little rectangle asking me to "say start listening" etc when i 
have to execute SR, so i guess i don't need SAPI or any related download

Original issue reported on code.google.com by austinpa...@gmail.com on 19 Jan 2012 at 2:33

GoogleCodeExporter commented 9 years ago
okay, just had a last moment doubt that i hadn't researched my problem well..

i found this:
http://code.activestate.com/lists/python-win32/10519/

and it seemed that win32*.pyd (which really are DLLs) could not be found, as 
according to that guy Frekin John

So i copied the 30 *.pyd files and placed them right next to 
C:\Python25\python.exe
and i tried the program again. It worked.

For all others out there just starting out:
30 files i copied constituted of 28 "win32*.pyd" name-form files, and remaining 
2 were "winxpgui.pyd" and "win2kras.pyd"

Happy programming!
BTW, authors of this wrapping, great work! This work of accessing the SAPI in C 
is really hectic (my friend is actually making a project on SR based action 
executor) and i wanted to show him he can drastically reduce his efforts by 
using python

Original comment by austinpa...@gmail.com on 19 Jan 2012 at 2:50

GoogleCodeExporter commented 9 years ago

Original comment by gundl...@gmail.com on 19 Nov 2012 at 4:19

GoogleCodeExporter commented 9 years ago

Original comment by gundl...@gmail.com on 19 Nov 2012 at 4:19