This question may well go unanswered, but I would dearly like some help on the matter. I found a snippet of code for dealing with Microsoft's Speech API in Python, and then went and learned about W3C's "Speech Recognition Grammar Specification Version 1.0".
I boiled it down to this:
>>> import win32com.client
>>> listener = win32com.client.Dispatch("SAPI.SpSharedRecognizer")
>>> context = listener.CreateRecoContext()
>>> grammar = context.CreateGrammar()
>>> grammar.DictationSetState(0)
>>> grammar.CmdLoadFromFile("C:\\grammar.grxml")
Traceback (most recent call last):
File "<pyshell#1>", line 1, in <module>
grammar.CmdLoadFromFile("C:\\grammar.grxml")
File "C:\Python26\lib\site-packages\win32com\gen_py\C866CA3A-32F7-11D2-9602-00C04F8EE628x0x5x4.py", line 2372, in CmdLoadFromFile
, LoadOption)
com_error: (-2147352567, 'Exception occurred.', (0, None, None, None, 0, -2147201021), None)
From what I've been able to uncover, the above error code corresponds to "SPERR_NO_DRIVER", which has something to do with "There is no wave driver installed."
I am now stuck. I have no idea what, in this context, a wave driver is, nor where to find it or how to debug it etc... Any thoughts?