Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

System.Speech problems with .NET 4.0 running on Win2k3 Server

19 views
Skip to first unread message

Hightechrider

unread,
Jul 28, 2009, 1:19:01 PM7/28/09
to
I'm getting a FormatException deep down in the speech API when I make a
simple call to GetInstalledVoices() from some .NET 4.0 code.

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.

0 new messages