Speech文字转语音

using System.Speech.Synthesis;  //项目引用System.Speech

var speech = new SpeechSynthesizer
{
    Volume = 100,
    Rate = -5
};
speech.SetOutputToWaveFile(path);
speech.Speak(message);
speech.SetOutputToNull();

仅在windows系统上支持

posted @ 2022-10-11 17:04  chenjingchun  阅读(26)  评论(0编辑  收藏  举报