WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Speech (https://forum.worldviz.com/showthread.php?t=3694)

nige777 04-07-2011 02:22 PM

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 "", line 11, in
  File "C:\Program Files\WorldViz\Vizard4\bin\lib\site-packages\win32com\client\makepy.py", line 70, in
    from win32com.client import genpy, selecttlb, gencache
  File "C:\Program Files\WorldViz\Vizard4\bin\lib\site-packages\win32com\client\__init__.py", line 11, in
    import gencache
  File "C:\Program Files\WorldViz\Vizard4\bin\lib\site-packages\win32com\client\gencache.py", line 662, in
    __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'

:confused:

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?

farshizzo 04-07-2011 02:31 PM

You probably don't have write permissions for that folder. Try running the makepy script using admin privileges.

nige777 04-08-2011 04:17 AM

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("")

- select the MS Speech object from the list and it spits out this
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)

However when I then run the speech.py script I get this error message-
Code:

Traceback (most recent call last):
  File "", line 11, in
  File "C:\Users\APD\Documents\Nige_PHD\Vizard_Python Development\speek.py", line 56, in
    class ContextEvents(win32com.client.getevents("SAPI.SpSharedRecoContext")):
TypeError: Error when calling the metaclass bases
    cannot create 'NoneType' instance
s

Any ideas?? Am I doing something wrong :confused: I got it to work in Viz3 with very little problem.

nige777 04-08-2011 04:51 AM

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)

I've noticed this method is different to what's being used in the Speek script (as it is presented in the knowledgebase article), what am I doing wrong can anyone tell? :confused:

gribbers 08-25-2012 10:46 AM

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.

gribbers 09-04-2012 01:42 AM

Ignore my previous post. Simple permissions problem. How embarrassing!


All times are GMT -7. The time now is 12:12 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC