
正文
.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 ;







