First of all, I don't understand, why, having .NET and C#, to use SAPI directly, when you can use the ready-to-use assembly "System.Speech.dll", which is already installed in the GAC, so you can reference it using the tab ".NET" of the "Add Reference" dialog. You can traverse installed voices in this way and use one or all of the installed ones:
namespace Voice {
using System.Speech.Synthesis;
class Program {
static void Main(string[] args) {
using (SpeechSynthesizer synthesizer = new SpeechSynthesizer()) {
synthesizer.SetOutputToDefaultAudioDevice();
PromptBuilder builder = new PromptBuilder();
builder.AppendText("You can use different voices!");
foreach (InstalledVoice voice in synthesizer.GetInstalledVoices()) {
synthesizer.SelectVoice(voice.VoiceInfo.Name);
synthesizer.Speak(builder);
}
}
}
}
}
At least, you can see what voices are really installed by examining of the collection returned as
synthesizer.GetInstalledVoices()
.
—SA