in PollyPlayer/Form1.cs [24:41]
private void LoadVoices()
{
voicesListBox.DisplayMember = "Description";
voicesListBox.Sorted = true;
using (var synth = new SpeechSynthesizer())
{
if (synth.GetInstalledVoices().Count == 0)
return;
// Output information about all of the installed voices.
foreach (var voice in synth.GetInstalledVoices())
{
if (voice.VoiceInfo.Name.StartsWith("Amazon Polly"))
{
voicesListBox.Items.Add(voice.VoiceInfo);
}
}
}
}