日期:2014-05-17 浏览次数:20842 次
using System.Speech;
using System.Speech.Recognition;//语音识别
using System.Speech.Synthesis;//语音合成
SpeechSynthesizer synth = new SpeechSynthesizer();
synth.Speak("Hello, world! i love you");
private void button1_Click(object sender, EventArgs e)
{
SpeechVoiceSpeakFlags spFlags = SpeechVoiceSpeakFlags.SVSFlagsAsync;
SpVoice voice = new SpVoice();
voice.Speak(textBox1.Text, spFlags);
}