From: Helge Elvik Date: 2006-06-13T22:58:09+09:00 Subject: Re: Problem with win32ole, sapi5 Hi, Thanks for the reply. Glad it wasn't me messing up something. It had me scratching my head for a long time. ;) I'll fall back to using the command line application for now. Luckily win32ole has no problem functioning together with ActiveWinamp, though, so even though my code looks really awful, I'll see if I can post my very first RubyQuiz contribution later today for #82. :) A nice SAPI5 voice together with ActiveWinamp to dynamically turn up and down the volume makes for a nice start for a "virtual exercise bot". I also made myself a small "language" to describe each exercise session, like this: - "WU300|J60|W20|A600(J60|W90)" That right there would mean something like: Warm up for 300 seconds Jog for 60 seconds Walk for 20 seconds Alternate between these for 600 seconds Jog for 60 seconds Walk for 90 seconds It's a pretty compact way to describe each session. It ends up being a 27 line yaml-file, when I've typed in all the sessions in the example posted in quiz #82. Regards, Helge -----Original Message----- From: Masaki Suketa [mailto:masaki.suketa@nifty.ne.jp] Sent: 13. juni 2006 15:31 To: ruby-talk ML Subject: Re: Problem with win32ole, sapi5 Hello, Sorry for being too late to reply. In message "Re: Problem with win32ole, sapi5" on 06/06/13, Helge Elvik writes: > Does anyone have any input on this old post? I'm having the same > problem, but I can't find any response to the post anywhere. Basically > it seems that win32ole doesn't discover that SpVoiceInstance.Voice is > both a gettable and settable property: > > irb(main):053:0> Win32::SpVoice.new.ole_get_methods > => [Status, Voice, AudioOutput, AudioOutputStream, Rate, Volume, > AllowAudioOutpu > tFormatChangesOnNextSet, EventInterests, Priority, AlertBoundary, > SynchronousSpe > akTimeout] > irb(main):054:0> Win32::SpVoice.new.ole_put_methods > => [Rate, Volume, AllowAudioOutputFormatChangesOnNextSet, > EventInterests, Priori > ty, AlertBoundary, SynchronousSpeakTimeout] > irb(main):055:0> > > Is this a bug? The following is valid VB source code: > > Set V.Voice = V.GetVoices().Item(List1.ListIndex) Sorry, this is a bug of Win32OLE. But please give me some time to fix it. Regards, Masaki Suketa