我想为我的交互式训练集制作一个文本到语音的程序.我用过System.Speech图书馆,但声音总是女性.我想用一些男性的声音读一些句子,一些用女性的声音读.(这两个声音是我唯一需要的声音.)
我正在使用Windows 8 Pro和Visual Studio 2010.我只能看到一个语音包,即Microsoft Zira Desktop.
我的代码如下.如何配置男声的使用?
SpeechSynthesizer synth = new SpeechSynthesizer();
synth.Rate = 1;
synth.Volume = 100;
synth.SelectVoiceByHints(VoiceGender.Male,VoiceAge.Adult);
synth.SpeakAsync(label18.Text);
Run Code Online (Sandbox Code Playgroud)