Title: Using Microsoft's TextToSpeech ActiveX control.
Question: Another method of adding voice to you Delphi applications.
Answer:
Instead of using the SAPI object, you can use Microsoft TextToSpeech ActiveX control.
All you need to do is:
1) Import the ActiveX control, Microsoft TextToSpeech, into Delphi.
2) Use the component on your AxtiveX tab on a form.
Now you can write yourself a Speak method, eg:
procedure Speak(sText:string);
begin
TextToSpeech.Speak(sText);
end;
Remember, when you end your application, use
TextToSpeech.StopSpeaking;
Thats it, now you application can speak to your user.
Note:
I've tested this with Windows 2000 and Delphi 7, sure it will work with Delphi 5 and higher. The ActiveX control name is: Microsoft Voice Text (Version 1.0), the dll file: C:\WinNT\Speech\Vtext.dll. On my system the version is 4.0.4.2903.
Thanks.
Deon.