Re: Win32::OLE events callback not executed

2012-04-12 Thread haratron
I'm willing to pay anyone that can make this work.
If anyone is interested, send me a personal email.

Thanks

On Sun, Mar 25, 2012 at 12:52 AM, haratron  wrote:
> I'm so desperate about this. Could anyone at least point in the right
> direction? Is WithEvents broken?
> There's the pyTTS module in Python that succeeds in firing the events.
> Yet I can't figure out how to port it.
>
> On Mon, Mar 19, 2012 at 9:46 PM, Howard Tanner  wrote:
>> Thanks anyway Jan.
>>
>> -Original Message-
>> From: perl-win32-users-boun...@listserv.activestate.com
>> [mailto:perl-win32-users-boun...@listserv.activestate.com] On Behalf Of Jan
>> Dubois
>> Sent: Monday, March 19, 2012 3:45 PM
>> To: 'Howard Tanner'; 'haratron'
>> Cc: perl-win32-users@listserv.activestate.com
>> Subject: RE: Win32::OLE events callback not executed
>>
>> On Mon, 19 Mar 2012, Howard Tanner wrote:
>>>
>>> I couldn't get any events to be fired either. Perhaps Jan can weigh in
>>> since he seems to be around today.
>>
>> Sorry, I don't know _why_ it isn't working, but I've seen others run into
>> the same problem with SAPI.  Unfortunately I don't have time to play with
>> SAPI stuff myself, so I won't be able to help much.
>>
>> Cheers,
>> -Jan
>>
>>
>> ___
>> Perl-Win32-Users mailing list
>> Perl-Win32-Users@listserv.ActiveState.com
>> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
>>
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Win32::OLE events callback not executed

2012-03-24 Thread haratron
I'm so desperate about this. Could anyone at least point in the right
direction? Is WithEvents broken?
There's the pyTTS module in Python that succeeds in firing the events.
Yet I can't figure out how to port it.

On Mon, Mar 19, 2012 at 9:46 PM, Howard Tanner  wrote:
> Thanks anyway Jan.
>
> -Original Message-
> From: perl-win32-users-boun...@listserv.activestate.com
> [mailto:perl-win32-users-boun...@listserv.activestate.com] On Behalf Of Jan
> Dubois
> Sent: Monday, March 19, 2012 3:45 PM
> To: 'Howard Tanner'; 'haratron'
> Cc: perl-win32-users@listserv.activestate.com
> Subject: RE: Win32::OLE events callback not executed
>
> On Mon, 19 Mar 2012, Howard Tanner wrote:
>>
>> I couldn't get any events to be fired either. Perhaps Jan can weigh in
>> since he seems to be around today.
>
> Sorry, I don't know _why_ it isn't working, but I've seen others run into
> the same problem with SAPI.  Unfortunately I don't have time to play with
> SAPI stuff myself, so I won't be able to help much.
>
> Cheers,
> -Jan
>
>
> ___
> Perl-Win32-Users mailing list
> Perl-Win32-Users@listserv.ActiveState.com
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
>
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Win32::OLE events callback not executed

2012-03-19 Thread Jan Dubois
On Mon, 19 Mar 2012, Howard Tanner wrote:
> 
> I couldn't get any events to be fired either. Perhaps Jan can weigh in since
> he seems to be around today.

Sorry, I don't know _why_ it isn't working, but I've seen
others run into the same problem with SAPI.  Unfortunately
I don't have time to play with SAPI stuff myself, so I
won't be able to help much.

Cheers,
-Jan


___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Win32::OLE events callback not executed

2012-03-19 Thread Howard Tanner
I couldn't get any events to be fired either. Perhaps Jan can weigh in since
he seems to be around today.

Here's my test code:

use strict;
use Win32::OLE qw(EVENTS);

my $vox = Win32::OLE->new ('SAPI.SpVoice')
  || die "Unable to create SAPI object\n";

sub Event {
  my ($Obj, $Event, @Args) = @_;
  print "Event: $Event\n";
}

Win32::OLE->WithEvents ($vox, \&Event);
$vox->{'EventInterests'} = 32; #Fire only new word events

my $text = "This is the Microsoft Speech Library.";

$vox->Speak ($text, 1); #Read text asynchronously

Win32::OLE->MessageLoop ();

-Original Message-
From: perl-win32-users-boun...@listserv.activestate.com
[mailto:perl-win32-users-boun...@listserv.activestate.com] On Behalf Of
haratron
Sent: Monday, March 19, 2012 1:54 PM
To: Howard Tanner
Cc: perl-win32-users@listserv.activestate.com
Subject: Re: Win32::OLE events callback not executed

Thanks for the answer.

I've also found these links that can help maybe:
http://code.activestate.com/lists/activeperl/13161/  <-- tried it, callback
still doesn't get executed
http://www.perlmonks.org/?node_id=429272 <-- tried it, doesn't work

I'm finding it difficult to translate that VB code to Perl.
If anyone can help, much appreciated.


On Mon, Mar 19, 2012 at 7:01 PM, Howard Tanner  wrote:
> From: perl-win32-users-boun...@listserv.activestate.com
> [mailto:perl-win32-users-boun...@listserv.activestate.com] On Behalf 
> Of haratron
> Sent: Monday, March 19, 2012 11:21 AM
> To: perl-win32-users@listserv.ActiveState.com
> Subject: Win32::OLE events callback not executed
>
> Hello,
>
> I want to implement "karaoke" functionality on my TTS (text to speech) 
> editor. Meaning that I want to highlight words the moment they are 
> spoken by the TTS system.
>
> I read that I need to watch for the onWord event.
>
> I have the same problem with this person:
> http://www.mail-archive.com/perl-win32-users@listserv.activestate.com/
> msg275
> 30.html
>
> The callback never gets executed.
>
> How can I fix this?
>
> Thank you,
> haratron
> ___
>
> Here's the dox from M$ on the Word event:
>
> http://msdn.microsoft.com/en-us/library/ms723593(v=vs.85).aspx
>
> It includes a VB example that does exactly what you want. Perhaps 
> someone here better at Perl than me can help you translate it.
>
> I don't know where Mr. "James Brown" got his ordinal from, but I 
> suspect the number "32", if that's correct at all, will be O/S version 
> dependent, since different versions of Windows have slightly different
versions of SAPI.
> Perhaps there's a better way in Perl to trap the Word event than using 
> the ordinal. And note that the event is Word, not onWord.
>
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Win32::OLE events callback not executed

2012-03-19 Thread haratron
Thanks for the answer.

I've also found these links that can help maybe:
http://code.activestate.com/lists/activeperl/13161/  <-- tried it,
callback still doesn't get executed
http://www.perlmonks.org/?node_id=429272 <-- tried it, doesn't work

I'm finding it difficult to translate that VB code to Perl.
If anyone can help, much appreciated.


On Mon, Mar 19, 2012 at 7:01 PM, Howard Tanner  wrote:
> From: perl-win32-users-boun...@listserv.activestate.com
> [mailto:perl-win32-users-boun...@listserv.activestate.com] On Behalf Of
> haratron
> Sent: Monday, March 19, 2012 11:21 AM
> To: perl-win32-users@listserv.ActiveState.com
> Subject: Win32::OLE events callback not executed
>
> Hello,
>
> I want to implement "karaoke" functionality on my TTS (text to speech)
> editor. Meaning that I want to highlight words the moment they are spoken by
> the TTS system.
>
> I read that I need to watch for the onWord event.
>
> I have the same problem with this person:
> http://www.mail-archive.com/perl-win32-users@listserv.activestate.com/msg275
> 30.html
>
> The callback never gets executed.
>
> How can I fix this?
>
> Thank you,
> haratron
> ___
>
> Here's the dox from M$ on the Word event:
>
> http://msdn.microsoft.com/en-us/library/ms723593(v=vs.85).aspx
>
> It includes a VB example that does exactly what you want. Perhaps someone
> here better at Perl than me can help you translate it.
>
> I don't know where Mr. "James Brown" got his ordinal from, but I suspect the
> number "32", if that's correct at all, will be O/S version dependent, since
> different versions of Windows have slightly different versions of SAPI.
> Perhaps there's a better way in Perl to trap the Word event than using the
> ordinal. And note that the event is Word, not onWord.
>
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Win32::OLE events callback not executed

2012-03-19 Thread Howard Tanner
From: perl-win32-users-boun...@listserv.activestate.com
[mailto:perl-win32-users-boun...@listserv.activestate.com] On Behalf Of
haratron
Sent: Monday, March 19, 2012 11:21 AM
To: perl-win32-users@listserv.ActiveState.com
Subject: Win32::OLE events callback not executed

Hello,

I want to implement "karaoke" functionality on my TTS (text to speech)
editor. Meaning that I want to highlight words the moment they are spoken by
the TTS system.

I read that I need to watch for the onWord event.

I have the same problem with this person:
http://www.mail-archive.com/perl-win32-users@listserv.activestate.com/msg275
30.html

The callback never gets executed.

How can I fix this?

Thank you,
haratron
___

Here's the dox from M$ on the Word event:

http://msdn.microsoft.com/en-us/library/ms723593(v=vs.85).aspx

It includes a VB example that does exactly what you want. Perhaps someone
here better at Perl than me can help you translate it.

I don't know where Mr. "James Brown" got his ordinal from, but I suspect the
number "32", if that's correct at all, will be O/S version dependent, since
different versions of Windows have slightly different versions of SAPI.
Perhaps there's a better way in Perl to trap the Word event than using the
ordinal. And note that the event is Word, not onWord.

___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs