private static dynamic _comTts; Type type = Type.GetTypeFromProgID("SAPI.SpVoice"); private void Read(string text) { Task.Factory.StartNew(() => { try { _comTts = Activator.CreateInstance(type); _comTts.Speak(text); } catch{} }); }
2021-07-23 16:07:57
private static dynamic _comTts; Type type = Type.GetTypeFromProgID("SAPI.SpVoice"); private void Read(string text) { Task.Factory.StartNew(() => { try { _comTts = Activator.CreateInstance(type); _comTts.Speak(text); } catch{} }); }