c# - Speech Recognition is not available on this system. SAPI and Speech Recognition engines cannot be found -
good day! try write simple speech text engine use speech sdk 11. try execute test example .
so , create console app , run code. (with task)
task speechrecognizer = new task(dowork); speechrecognizer.start(); speechrecognizer.wait(); static void dowork() { // create new speechrecognitionengine instance. speechrecognitionengine sre = new speechrecognitionengine(); // configure input recognizer. sre.setinputtowavefile(@"c:\test\colors.wav"); // create simple grammar recognizes "red", "green", or "blue". choices colors = new choices(); colors.add(new string[] { "red", "green", "blue" }); // create grammarbuilder object , append choices object. grammarbuilder gb = new grammarbuilder(); gb.append(colors); // create grammar instance , load speech recognition engine. grammar g = new grammar(gb); sre.loadgrammar(g); // register handler speechrecognized event. sre.speechrecognized += new eventhandler<speechrecognizedeventargs>(sre_speechrecognized); // start recognition. sre.recognize(); }
but exception:speech recognition not available on system. sapi , speech recognition engines cannot found.i try install speechsdk51 ,but have no result.
can tell me how fix error?
thank you!
p.s. error arises @ :
// create new speechrecognitionengine instance. speechrecognitionengine sre = new speechrecognitionengine();
did add both x64 , x86 versions of runtime component? worked me.
Comments
Post a Comment