public class SpeechLoud
{
public void LoudSpeek(string str)
{
SpeechSynthesizer voice = new SpeechSynthesizer(); //创建语音实例
voice.Rate = 2; //设置语速,[-10,10]
voice.Volume = 100; //设置音量,[0,100]
voice.SpeakAsync(str); //播放指定的字符串,这是异步朗读
}
}
public class SpeechLoud
{
public void LoudSpeek(string str)
{
SpeechSynthesizer voice = new SpeechSynthesizer(); //创建语音实例
voice.Rate = 2; //设置语速,[-10,10]
voice.Volume = 100; //设置音量,[0,100]
voice.SpeakAsync(str); //播放指定的字符串,这是异步朗读
}
}