2009-07-26 14:51:18,359 [Realtek HD Audio output announcements0] ERROR
Announcement [SPEAK] - System.FormatException: Input string was not in a
correct format.
at System.Number.StringToNumber(String str, NumberStyles options,
NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
at System.Number.ParseInt32(String s, NumberStyles style,
NumberFormatInfo info)
at
System.Speech.Internal.SapiAttributeParser.GetCultureInfoFromLanguageString(String valueString)
at System.Speech.Synthesis.VoiceInfo..ctor(VoiceObjectToken token)
at
System.Speech.Internal.Synthesis.VoiceSynthesis.BuildInstalledVoices(VoiceSynthesis voiceSynthesizer)
at System.Speech.Internal.Synthesis.VoiceSynthesis..ctor(WeakReference
speechSynthesizer)
at System.Speech.Synthesis.SpeechSynthesizer.get_VoiceSynthesizer()
at System.Speech.Synthesis.SpeechSynthesizer.GetInstalledVoices()
at ...
which is doing essentially ...
using (SpeechSynthesizer synthvoice = new
SpeechSynthesizer())
{
var voices =
synthvoice.GetInstalledVoices();
...
}
The same code runs fine on Win7 or fine when compiled against .NET 3.5. But
when compiled as a .NET 4.0 application it fails to run under Win2k3 Server.