Regarding the speech issue, write the simple program below.
I sent it by mail but received no answer...
With the codeSite trace, there is always 5s response time:
unit UnitSpeech;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, VCL.TMSFNCTypes, VCL.TMSFNCUtils,
VCL.TMSFNCGraphics, VCL.TMSFNCGraphicsTypes, Vcl.StdCtrls,
VCL.TMSFNCCustomControl, VCL.TMSFNCWebBrowser, VCL.TMSFNCCustomWEBControl,
VCL.TMSFNCCustomWEBComponent, VCL.TMSFNCWXSpeechSynthesis,
codesitelogging;
type
TForm4 = class(TForm)
Free: TButton;
Create: TButton;
Close: TButton;
procedure FreeClick(Sender: TObject);
procedure TMSFNCWXSpeechSynthesis1VoiceReady(Sender: TObject);
procedure TMSFNCWXSpeechSynthesis1Start(Sender: TObject);
procedure TMSFNCWXSpeechSynthesis1End(Sender: TObject);
procedure CreateClick(Sender: TObject);
procedure CloseClick(Sender: TObject);
end;
var
Form4: TForm4;
voiceready, started: boolean;
TMSFNCWXSpeechSynthesis1: TTMSFNCWXSpeechSynthesis = nil;
implementation
{$R *.dfm}
procedure TForm4.FreeClick(Sender: TObject);
begin
if TMSFNCWXSpeechSynthesis1 = nil then exit;
codesite.AddSeparator;
codesite.send('Free start');
TMSFNCWXSpeechSynthesis1.Free;
TMSFNCWXSpeechSynthesis1 := nil;
codesite.send('Free end');
end;
procedure TForm4.CloseClick(Sender: TObject);
begin
freeclick(sender);
end;
procedure TForm4.CreateClick(Sender: TObject);
begin
if TMSFNCWXSpeechSynthesis1 <> nil then exit;
TMSFNCWXSpeechSynthesis1 := TTMSFNCWXSpeechSynthesis.Create(form4);
with TMSFNCWXSpeechSynthesis1 do begin
visible := false;
parent := form4;
onEnd := TMSFNCWXSpeechSynthesis1End;
onVoiceready := TMSFNCWXSpeechSynthesis1VoiceReady;
onStart := TMSFNCWXSpeechSynthesis1Start;
end;
end;
procedure TForm4.TMSFNCWXSpeechSynthesis1End(Sender: TObject);
begin
started := false;
end;
procedure TForm4.TMSFNCWXSpeechSynthesis1Start(Sender: TObject);
begin
started := true;
end;
procedure TForm4.TMSFNCWXSpeechSynthesis1VoiceReady(Sender: TObject);
begin
voiceready := true;
end;
end.