간단한 음성 인식 응용 프로그램을 작성 중입니다. GrammarBuilder에 대한 도움이 필요합니다. 여기에 내가 시도 것입니다 :GrammarBuilder로 다양한 주문을 허용하는 방법
Choices choice1 = new Choices(....);
Choices choice2 = new Choices(....);
Choices choice3 = new Choices(....);
GrammarBuilder gb = new GrammarBuilder();
gb.Append(choice1);
gb.Append(choice2);
gb.Append(choice3);
Grammar grammar = new Grammar(gb);
recognitionEngine.LoadGrammar(grammar);
이 코드는 사용자가 순서대로 다음 선택 2 다음 choice3 choice1에서 무언가 말을 기대하고 잘 작동합니다. 그러나 choice1과 choice2, 그리고 choice2와 choice3의 모든 조합을 기대하는 코드가 필요합니다. 이 방법을 구현하는 방법을 잘 모르겠습니다.
실제로 내가 한 것은 GrammarBuilder를 건너 뛰고 srgs xml과 함께 사용했기 때문에 효과적이었습니다. – kr13