C# 语音播报

        using System.Speech.Synthesis;

        SpeechSynthesizer speech = new SpeechSynthesizer();

        speech.Rate = 0;//语速为正常语速
        speech.SelectVoice("Microsoft Lili");//设置播音员(中文)
        speech.Volume = 100;//音量为最大音量
        speech.SpeakAsync(str);//语音阅读方法
        播报str内容       

猜你喜欢

转载自blog.csdn.net/chenchaozzu/article/details/81585708