得用一个线程来完成这个工作,我光写线程中的代码
var voice: TSpVoice;
function RecordWav(p: pointer): dword;
var FileStream: TSpFileStream;
begin
if form1.SaveDialog1.Execute then
begin
FileStream := TSpFileStream.Create(nil);
FileStream.Open(form1.SaveDialog1.FileName, SSFMCreateForWrite, true);
voice.AudioOutputStream := FileStream.DefaultInterface;
voice.Speak(form1.memo1.Text, SVSFlagsAsync);
voice.WaitUntilDone(INFINITE);
FileStream.Close;
end;
唉,才值给一分,我白辛苦了
end;