#1
|
|||
|
|||
Speech
Thought I'd give speech recognition a whirl, so after installing pywin32 I navigate to the makepy script in the Viz 4 site-packages but all I get is an error message thus:
Code:
C:\Program Files\WorldViz\Vizard4\bin\lib\site-packages\win32com\__init__.py:89: ImportWarning: Not importing directory 'C:\Program Files\WorldViz\Vizard4\bin\lib\site-packages\win32com\gen_py': missing __init__.py import win32com.gen_py Traceback (most recent call last): File "<string>", line 11, in <module> File "C:\Program Files\WorldViz\Vizard4\bin\lib\site-packages\win32com\client\makepy.py", line 70, in <module> from win32com.client import genpy, selecttlb, gencache File "C:\Program Files\WorldViz\Vizard4\bin\lib\site-packages\win32com\client\__init__.py", line 11, in <module> import gencache File "C:\Program Files\WorldViz\Vizard4\bin\lib\site-packages\win32com\client\gencache.py", line 662, in <module> __init__() File "C:\Program Files\WorldViz\Vizard4\bin\lib\site-packages\win32com\client\gencache.py", line 58, in __init__ Rebuild() File "C:\Program Files\WorldViz\Vizard4\bin\lib\site-packages\win32com\client\gencache.py", line 649, in Rebuild _SaveDicts() File "C:\Program Files\WorldViz\Vizard4\bin\lib\site-packages\win32com\client\gencache.py", line 65, in _SaveDicts f = open(os.path.join(GetGeneratePath(), "dicts.dat"), "wb") File "C:\Program Files\WorldViz\Vizard4\bin\lib\site-packages\win32com\client\gencache.py", line 141, in GetGeneratePath f = open(fname,"w") IOError: [Errno 13] Permission denied: 'C:\\Program Files\\WorldViz\\Vizard4\\bin\\lib\\site-packages\\win32com\\gen_py\\__init__.py' Would be nice to be able to start moving my work over to 4, but am a bit stuck because I also use other automation objects via makepy, so its quite a biggy for me. Any ideas whats going on from that error message? |
#2
|
|||
|
|||
You probably don't have write permissions for that folder. Try running the makepy script using admin privileges.
|
#3
|
|||
|
|||
Ok, well managed to get makepy to run through the Viz 4 interactive prompt (is this a valid method of doing this?) using this code:-
Code:
import win32com.client.makepy win32com.client.makepy.ShowInfo("") Code:
Microsoft Speech Object Library {C866CA3A-32F7-11D2-9602-00C04F8EE628}, lcid=0, major=5, minor=4 >>> # Use these commands in Python code to auto generate .py support >>> from win32com.client import gencache >>> gencache.EnsureModule('{C866CA3A-32F7-11D2-9602-00C04F8EE628}', 0, 5, 4) Code:
Traceback (most recent call last): File "<string>", line 11, in <module> File "C:\Users\APD\Documents\Nige_PHD\Vizard_Python Development\speek.py", line 56, in <module> class ContextEvents(win32com.client.getevents("SAPI.SpSharedRecoContext")): TypeError: Error when calling the metaclass bases cannot create 'NoneType' instances |
#4
|
|||
|
|||
Interestingly I have just managed to manipulate the IFCsvr activeX object with no problems - however I am using this within my code-
Code:
from win32com.client import gencache gencache.EnsureModule('{B2173F4D-1371-4649-8554-310D6DC1734F}', 0, 1, 4) |
#5
|
|||
|
|||
nige777,
Did you ever get to the bottom of this? I only ask because I'm having the same problem even though I'm logged in as 'Administrator'. Thanks. |
#6
|
|||
|
|||
Ignore my previous post. Simple permissions problem. How embarrassing!
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Viz speech cutting off early | Enlil | Vizard | 7 | 01-27-2016 04:41 AM |
Speech Bubbles | jassel41 | Vizard | 0 | 11-30-2009 10:12 PM |
Vizard tech tip: Text to Speech | Jeff | Vizard | 1 | 01-15-2009 09:39 PM |
Avatar finish speech ? | djdesmangles | Vizard | 2 | 02-15-2008 06:56 AM |
Speech Recognition | Johannes | Vizard | 1 | 05-16-2005 10:46 AM |