は私のコードです:スピーチシンセサイザーは、「入力文字列が正しい形式ではありませんでした」ここ
string _message = "Hello world.";
SpeechSynthesizer _synth = new SpeechSynthesizer();
Prompt _prompt = new Prompt(_message);
_synth.Speak(_prompt);
私は私の人生のために、このエラーを引き起こしている正確に何を把握することはできません。
「入力文字列が正しい形式ではありませんでした。私は_synth.Speak(_prompt);
EDITを呼び出すときに、このエラーが発生し
行がある:私は私のデスクトップコンピュータ上でこのコードを試してみましたし、何かが私の私のラップトップにインストールすると間違っているので、それが正常に動作します。それでも私はこの問題を解決するかどうかは、あまりにもわからないんだけど...
EDIT:
スタックトレース:
System.FormatException: Input string was not in a correct format.
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffe
r& number, NumberFormatInfo info, Boolean parseDecimal)
at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo in
fo)
at System.Speech.Internal.SapiAttributeParser.GetCultureInfoFromLanguageStrin
g(String valueString)
at System.Speech.Synthesis.VoiceInfo..ctor(VoiceObjectToken token)
at System.Speech.Internal.Synthesis.VoiceSynthesis.BuildInstalledVoices(Voice
Synthesis voiceSynthesizer)
at System.Speech.Internal.Synthesis.VoiceSynthesis..ctor(WeakReference speech
Synthesizer)
at System.Speech.Synthesis.SpeechSynthesizer.get_VoiceSynthesizer()
at System.Speech.Synthesis.SpeechSynthesizer.Speak(Prompt prompt)
at TTSTesting.Program.Speak(String _message) in C:\Users\ctanaka\Desktop\TTST
esting\TTSTesting\Program.cs:line 22
サイドノートとして、私はこの正確なコードを自分の他のPCで試してみましたが、問題なく動作していたようです。 – Bob
その方法に関する文書はありますか? – Tudor
これはhttp://msdn.microsoft.com/en-us/library/ms586905.aspxですか? –