0
請當它達到e.SetInputToWaveStream(stream);
它拋出錯誤System.FormatException: Wave file not valid
System.FormatException:Wave文件無效
什麼是這裏的問題看看下面的代碼片段
using System.IO;
MemoryStream stream = new MemoryStream();
SpeechSynthesizer s = new SpeechSynthesizer();
s.setOutputToWaveStream(stream);
s.Speak("hello world");
SpeechRecognitionEngine e = new SpeechRecognitionEngine(new System.Globalization.CuntureInfo("en-US");
//Set grammar code goes here
e.SetInputToWaveStream(stream);
?