On February 27 2009, Stef Mientki wrote: > Ik heb het op 2 computers geprobeerd, allebei met een > uitgebreide winXP versie. De een had een uitgebreide > Office 2000? geinstalleerd en heeft daarmee automatisch > SAPI 5.1 geinstalleerd, de andere computer heeft geen MS- > office en daar is handmatig SAPI 5.1 bijgezet. De Python > installaties op beide systemen zijn nagenoeg identiek. > > De eerste vraag is natuurlijk of SAPI 5.1 voldoende is, > immers SAPI 5.1 staat bekend als een ASR, terwijl > Dragonfly een WSR nodig heeft ?
Short answer: SAPI 5.1 is sufficient. But you'll have to install the additional speech SDK 5.1. Read on for the long answer. > Heeft iemand een klein voorbeeldje om te zien, of de > geinstallleerde sound api voldoende is ? The dragonfly-main.py file in the examples subdirectory within the Dragonfly distribution can be used for this. It is a script which searches for other Python files within its directory, and tries to load them as a voice-command modules. If you can run this successfully, then your installed SR engine is okay. > SAPI 5.1 zou erg aantrekkelijk zijn, omdat deze vrij > verkrijgbaar is ! Actually, SAPI 5.1 is sufficient. One of my test machines runs Windows XP and SAPI 5.1, and I run (and use) Dragonfly-based voice-commands on it. But, and here is the problem, for this to work correctly I have to install a speech SDK which *used to be* available for free from Microsoft. The filename was SpeechSDK51.exe. The download page from Microsoft has disappeared, and I'm not sure why. Occasionally I see people writing that this SDK is now part of the complete Windows SDK, or something like that. I haven't figured this out yet, and don't know right now what you should do to get that speech SDK installed. (If you really want to try this out, I have that original file lying around. I could send it to anybody interested. But in the long run, it would of course be nice to know what Microsoft is up to.) > De foutmeldingen op beide systemen zijn verschillend, hier > een van beide, misschien dat het iemand iets zegt. > > UNKNOWN: CommandModule('notepad_foodgroups.py'): Error > loading module: (-2147352567, 'Exception occurred.', (0, > None, None, None, 0, -2147200948), None) Beautiful COM trace back information. From this error message it is of course completely obvious what went wrong. Or not... Does anybody know if it is possible to get more exception information after a failed COM call? I can find all the information I want on the (local) Python side, but have no idea what happened on the other side of the COM connection. This exception is raised when Dragonfly calls the CreateRecoContext() method of the SAPI.SpSharedRecognizer COM object. This works under Windows Vista, and it works on my Windows XP test machine with the speech SDK 5.1 installed. But, as you noticed, it does not work on other Windows XP machines (at least not on my machines without the speech SDK). Apparently you need to speech SDK to be able to do this, and Dragonfly definitely needs to be able to do this. At least, I am not aware of any other way to use WSR (or ASR) without calling that method to create a recognition context. > UNKNOWN: CommandModule('outlook_example.py'): Error > loading module: cannot import name LiteralChoice Sorry about that. Stale example files. Current version in the repository has fixed this. Thank you for your interest in Dragonfly. This definitely motivates me to continue developing it for other people, besides myself. Chris _______________________________________________ Python-nl mailing list Python-nl@python.org http://mail.python.org/mailman/listinfo/python-nl