Application output to Synthesizer.Speak - System.Speech.dll - Non Microsoft Voices

My problem is that my understanding of the reason for this question is alluding to me, not to the workaround. I wonder if anyone can explain why I am getting this problem?

I populate a ComboBox with local computers installed:

private void getSystemVoices()
{
foreach (InstalledVoice voiceName in synthesizer.GetInstalledVoices())
{
this.voiceComboBox.Items.Add(voiceName.VoiceInfo.Name);
}
}

My Application runs on an x86 processor, so all installed voices are populated in this ComboBox. I have some Acapela Voices Installed, I believe that they are compatible with SAPI 5.1. Lucy, Heather and Ryan.

I am testing this code for using tones:

// Initialize a new instance of the SpeechSynthesizer...
SpeechSynthesizer synthesizer = new SpeechSynthesizer();

// Config the audio output... 
synthesizer.SetOutputToDefaultAudioDevice();

// Initialize a new instance of the PromptBuilder...
PromptBuilder promptBuilder = new PromptBuilder();

// Config SSML...
promptBuilder.AppendSsmlMarkup("<voice xml:lang=\"en-AU\">");
promptBuilder.StartVoice(this.voiceComboBox.SelectedItem.ToString());
promptBuilder.AppendText("The quick brown fox jumps over the lazy dog.");
promptBuilder.EndVoice();
promptBuilder.AppendSsmlMarkup("</voice>");

// Speak the prompt...
synthesizer.Speak(promptBuilder);

: - , "Microsoft Anna", . Try/Catch. , , . , .

API Microsoft Speech API ?

Microsoft

.net4.5, System.Speech.dll V4.0.0.0.

- ?

[ ] : SPVoice :

using SpeechLib;

// SAPI 5.1 Speech Config...
SpVoice voice = new SpVoice();
voice.Rate = speechRate.Value;
voice.Volume = speechVolume.Value;
voice.Voice = voice.GetVoices("", "").Item(voiceComboBox.SelectedIndex);
voice.Speak(readerTextBox.Text, SpeechVoiceSpeakFlags.SVSFlagsAsync);

Microsoft SpeechSynthesizer .

+4
1

.Net , . , (Windows 7):

  • ""
  • computer my computer
  • Event Viewer
  • Windows Logs
  • Application

. .

, - try-catch, , Environment.FailFast(); ( , ). , , Mushroomed-SuperMario :-). , , , , , , ( , ).

0

Source: https://habr.com/ru/post/1529107/


All Articles