Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Text to speech in Delphi

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?

like image 299
Jlouro Avatar asked Jan 20 '09 11:01

Jlouro


3 Answers

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

like image 55
Cesar Romero Avatar answered Nov 14 '22 02:11

Cesar Romero


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;
like image 35
Francesca Avatar answered Nov 14 '22 01:11

Francesca


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 ;-)

like image 2
Alister Avatar answered Nov 14 '22 02:11

Alister