0
예를 들어, 화면 가운데에서 마우스를 클릭하는 명령 "center"를 원한다고 가정 해 봅시다. 간단한 예제지만, 나는 그것의 문법 측면에 더 관심이 있습니다.System.Speech를 사용하여 정확한 구를 명령으로 인식하는 방법
"센터"만 일치 시키려면 어떻게해야합니까?
그래서 일시 중지하면 "가운데"라고 말한 다음 일시 중지하면 일치합니다.
하지만 내가 "방 중앙에있다"고 말하면 나는 성냥을 얻지 못합니다. 일반적으로 좋은 직업은 그들이 있는지 인식하지 못하기 할
Choices center = new Choices(new string[] { "center" });
SemanticResultKey centerKeys = new SemanticResultKey("center", center);
GrammarBuilder centerGrammarBuilder = new GrammarBuilder();
centerGrammarBuilder.Append(centerKeys);
speechRecognitionEngine.UnloadAllGrammars();
speechRecognitionEngine.LoadGrammar(new Grammar(centerGrammarBuilder));