static void Main(string[] args)
{
    try
    {
        SpeechRecognitionEngine recEngine = new SpeechRecognitionEngine();
        SpeechSynthesizer speech = new SpeechSynthesizer();
        speech.Rate = 0;//速度
        speech.Volume = 100;//音量,0-100

        speech.SpeakAsync("欢迎使用电力安全工器具集约化智能管控系统");//异步播放
        Thread.Sleep(2000);
        speech.SpeakAsyncCancelAll();//停止前面的所有播放
        speech.SpeakAsync("中华人民共和国");//异步播放,但是要等到前面的发音完成后才会播放该发音

        speech.Speak("欢迎使用电力安全工器具集约化智能管控系统");
        speech.Speak("中华人民共和国");
    }
    catch (Exception ex)
    {
        Console.WriteLine(ex);
    }

    Console.ReadKey();
}

 

相关文章:

  • 2022-12-23
  • 2021-10-02
  • 2021-05-30
  • 2022-12-23
  • 2021-07-13
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-02-19
  • 2021-10-07
  • 2021-08-26
  • 2021-09-13
  • 2021-11-01
相关资源
相似解决方案