Text to speech
-
19-08-2019 - |
Question
I am improving a small alarm/reminder application that I build years ago, and I would like to do an hourly beep, but instead of beeping it would be much nicer it would tell time. Is there any simple way to do this in DELPHI D2007 or later? Thanks
Solution
Check Brian Long tutorial's Speech Synthesis & Speech Recognition Using SAPI 5.1
I wrote a text to speech software using this tutorial.
It reads the clipboard content when I press CTRL + F10
OTHER TIPS
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ComObj;
[...]
procedure TForm1.Button1Click(Sender: TObject);
var
Voice: Variant;
begin
Voice := CreateOLEObject('SAPI.SpVoice');
Voice.speak('Hello World');
end;
I did a video awhile back on making your applications talk in Delphi. I personally haven't ever found a use for text to speech in one of my applications, but it's a fun thing to know how to do ;-)
In my code I use MS Agent and TAgntSrvr component: http://delphi.icm.edu.pl/ftp/d30free/agntsrvr.htm
Also you can check this link or just Google around: "text speech delphi"