Hi,
I came upon this code example when actually looking for something else.
Let the computer speak! (Microsoft Voice API)
- Add a Button and Edit box
- Add this uses statement: uses Comobj;
- Add this coding for the button (the program will read the contents of Edit1):
procedure TForm1.Button1Click(Sender: TObject);
var
CompVoice : OLEVariant;
sText : String;
begin
sText := Edit1.Text;
CompVoice := CreateOLEObject('SAPI.SpVoice');
CompVoice.Speak(sText, 0);
end;
It works on Memos as well as edits and speaks out the text contained in these controls.
What I'd like to know is whether there is anyway of controlling the speed of the speaking voice etc?
Thanks
Blod