From: Thomas Morgan Date: 2008-06-30T14:02:52+09:00 Subject: Win32OLE and SAPI5 voice recognition problem I stumbled across the ruby library for this while poking around for something else in RAA, and it seemed interesting. I tried to port something relatively simple to see if I could get it working... --- require "win32/sapi5" include Win32 listener = SpSharedRecognizer.new context = listener.CreateRecoContext() grammar = context.CreateGrammar(1) grammar.DictationLoad grammar.DictationSetState(1) ev = WIN32OLE_EVENT.new(context, "ISpRecoContext") --- ... And that last line is as far as it gets, with this error message: recotest.rb:15:in `initialize': failed to query IConnectionPoint (RuntimeError) HRESULT error code:0x80040200 from recotest.rb:15:in `new' from recotest.rb:15 I don't *think* more initialization is required before being able to receive events from the object. (At least, it didn't appear to be in the examples that I looked at.) And I don't think that's the wrong interface, though with the way the documentation is set up it's hard to be sure. In any case, there's something wrong, but I'm not sure what. Anyone have any ideas? (Alternately, anyone have some working ruby speech recognition code. Once I have something that works, I can start tweaking it until I figure out what I'm doing, but without having some kind of starting point...) -Morgan. -- Posted via http://www.ruby-forum.com/.