1 public static class voiceHelper 2 { 3 public static System.Speech.Synthesis.SpeechSynthesizer synth; 4 /// <summary> 5 /// 语音提示 6 /// </summary> 7 /// <param name="content">提示内容</param> 8 public static void SpeakAsync(string content) 9 { 10 Dispose(); 11 synth = new System.Speech.Synthesis.SpeechSynthesizer(); 12 synth.SpeakAsyncCancelAll(); 13 synth.SpeakAsync(content);//异步朗读 14 } 15 16 /// <summary> 17 /// 释放资源 18 /// </summary> 19 public static void Dispose() 20 { 21 if (synth != null) 22 { 23 synth.Dispose(); 24 } 25 26 } 27 }
winform语音提示
免责声明:文章转载自《winform语音提示》仅用于学习参考。如对内容有疑问,请及时联系本站处理。
上篇在线考试实现倒计时的代码20200311 5. Response下篇
宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=