WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 04-07-2011, 02:22 PM
nige777 nige777 is offline
Member
 
Join Date: Nov 2007
Location: UK
Posts: 78
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?
Reply With Quote
  #2  
Old 04-07-2011, 02:31 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
You probably don't have write permissions for that folder. Try running the makepy script using admin privileges.
Reply With Quote
  #3  
Old 04-08-2011, 04:17 AM
nige777 nige777 is offline
Member
 
Join Date: Nov 2007
Location: UK
Posts: 78
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 "<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
Any ideas?? Am I doing something wrong I got it to work in Viz3 with very little problem.
Reply With Quote
  #4  
Old 04-08-2011, 04:51 AM
nige777 nige777 is offline
Member
 
Join Date: Nov 2007
Location: UK
Posts: 78
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?
Reply With Quote
  #5  
Old 08-25-2012, 10:46 AM
gribbers gribbers is offline
Member
 
Join Date: Aug 2012
Posts: 2
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.
Reply With Quote
  #6  
Old 09-04-2012, 01:42 AM
gribbers gribbers is offline
Member
 
Join Date: Aug 2012
Posts: 2
Ignore my previous post. Simple permissions problem. How embarrassing!
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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


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


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