上传者: hurrytttt
|
上传时间: 2021-10-25 18:12:42
|
文件大小: 34.95MB
|
文件类型: RAR
Application.DoEvents();
//SpeechSynthesizer synth = new SpeechSynthesizer();
//synth.SelectVoice("Microsoft Simplified Chinese");
Type type = Type.GetTypeFromProgID("SAPI.SpVoice");
dynamic spVoice = Activator.CreateInstance(type);
for (int i = 0; i < spVoice.GetVoices(string.Empty, string.Empty).Count; i++)
{
if (spVoice.GetVoices(string.Empty, string.Empty).Item(i).GetDescription(0) == "ScanSoft Sin-Ji_Full_22kHz")
{
spVoice.Voice = spVoice.GetVoices(string.Empty, string.Empty).Item(i);
}
}
spVoice.Rate = 3;
spVoice.Speak("无资料");