I've been playing with the text to speech - SAPI. I want to attach a method to the spVoice.onWord event, but cannot figure out how to assigned the defined spVoice1Word procedure to this event.
spVoice1Word is defined as
I've been using
and to unassign it when I'm finished
but it tells me that I don't have the correct number of parameters. I thought I just needed to point the event to the correct method, what am I doing wrong?
spVoice1Word is defined as
Code:
procedure TForm1.SpVoice1Word(ASender: TObject; StreamNumber: Integer;StreamPosition: OleVariant; CharacterPosition, Length: Integer);
I've been using
Code:
spVoice.OnWord := spVoiceWord;
and to unassign it when I'm finished
Code:
spVoice.OnWord := nil;
but it tells me that I don't have the correct number of parameters. I thought I just needed to point the event to the correct method, what am I doing wrong?