Hello,
I am using FPC 3.1.1.
I am playing with SAPI5. It almost works, but I am unable to set a Voice of SPVoice object through OleVariant. The following program works fine in Delphi 6, but an exception on line 12 is raised when compiled by FPC:

program sapi;

uses
  ActiveX, ComObj;

var
  SPVoice: OleVariant;

begin
  CoInitializeEx(nil, 0);
  SPVoice := CreateOleObject('SAPI.SPVoice');
  SPVoice.Voice := SPVoice.GetVoices.Item(5);
  SPVoice.Speak('Hello from SAPI5.', 0);
end.

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to