我想在 c# 中使用 tts 并且我的代码适用于英语,但现在我想在荷兰语中使用它。
private void btnSpeak_Click(object sender, EventArgs e)
{
SpeechSynthesizer synthesizer = new SpeechSynthesizer();
foreach (var v in synthesizer.GetInstalledVoices(CultureInfo.CurrentCulture))
{
VoiceInfo info = v.VoiceInfo;
OutputVoiceInfo(info);
}
synthesizer.SelectVoiceByHints(VoiceGender.Male, VoiceAge.Adult, 0, CultureInfo.CurrentCulture);
synthesizer.Volume = 100; // 0...100
synthesizer.Rate = 1; // -10...10
// Synchronous
if(textBox1.Text != null)
synthesizer.SpeakAsync(textBox1.Text);
}
private static void OutputVoiceInfo(VoiceInfo info)
{
Console.WriteLine("Name: {0}, culture: {1}, gender: {2}, age: {3}.\n", info.Name, info.Culture, info.Gender, info.Age);
Console.WriteLine("Description: {0}\n", info.Description);
}
我应该安装什么东西才能说荷兰语吗?