.net语音播放,自定义播报文字

 

 

 

                // using System.Speech.Synthesis;
                SpeechSynthesizer synth = new SpeechSynthesizer();
                // Configure the audio output.   
                synth.SetOutputToDefaultAudioDevice();

                synth.Speak("请说一句话");
                synth.Speak("Speak English,please");

                // Speak a string.  
                synth.Speak("This example demonstrates a basic use of Speech Synthesizer");

                Console.WriteLine();
                Console.WriteLine("Press any key to exit...");
                Console.ReadKey();
                return 0;

 

posted @ 2018-11-16 17:50  Minily  阅读(1214)  评论(0编辑  收藏  举报