API - faca o programa falar

Top  Previous  Next

// faça o Delphi Falar!

 

uses ComObj;

 

procedure TForm1.Button2Click(Sender: TObject);

var

  objVoice: OLEVariant;

begin

  objVoice := CreateOLEObject('SAPI.SpVoice');

  objVoice.Speak('Hello Diego, I am the Delphy',0);

  objVoice := unassigned;

end;