public void Generated(string voicer, double volume, double rate, string content, string file) { if (Voicers.Contains(voicer) == false) { return; } Check(ref volume, ref rate); BeginWork(() => { var path = new System.IO.FileInfo(file); if (path.Directory.Exists == false) { System.IO.Directory.CreateDirectory(path.Directory.FullName); } Synth.SelectVoice(voicer); Synth.Volume = (int)volume; Synth.Rate = (int)rate; Synth.SetOutputToWaveFile(file); Synth.Speak(content); Synth.SetOutputToDefaultAudioDevice(); }); }