--- In advanced_delphi@yahoogroups.com, "Charlie Chambers"
<chambers...@...> wrote:
>
> Hi David,
> Good job as i just confirmed the same with
> the code you set!
> 
> Cheers,
> Charlie
> 

Thank you Charlie.

Not too bad... considering I'm a newbie. :)

Oh yea... I figured out how to do the
playback of the generated wave file.

Add a third button (to my previous post)
and put the following in it's procedure...

// Start Of Code
  FileName := 'sapi_voice_test.wav';
  SPVoice1 := TSpVoice.Create(nil);
  SpVoice1.Speak(FileName, SVSFIsFilename);
  SPVoice1.Free;
// End Of Code

I was using a VB example and that's why I
couldn't get it to work. In the VB example
they use the .SpeakStream method (which
produces a Type mismatch error in Delphi).

I'm not clear on... why it doesn't work.
The SpFileStream's default interface is
ISpeechFileStream. ISpeechFileStream is
inherited from ISpeechBaseStream, which
is what the .SpeakStream method needs.
*shrugs*

Anyways... in Delphi you can simply use
the .Speak method (as shown above) and
it works.

David


Reply via email to