SrgsGrammarMode 열거형

정의

문법에 의해 정의 되는 입력의 종류는 SrgsDocument, 일치 합니다.

public enum class SrgsGrammarMode
public enum SrgsGrammarMode
type SrgsGrammarMode = 
Public Enum SrgsGrammarMode
상속
SrgsGrammarMode

필드

Dtmf 1

SrgsDocument 개체는 음성 대신 전화에서 유사한 DTMF 소리와 일치합니다.

Voice 0

SrgsDocument 개체는 음성 입력와 일치합니다.

예제

string srgsDocumentFile = Path.Combine(Path.GetTempPath(), "srgsDocumentFile.xml");  
SrgsDocument document = null;  
GrammarBuilder builder = null;  
Grammar grammar = null;  

Choices firstThree = new Choices(new string[] {"1", "2", "3"});  
Choices nextThree = new Choices(new string[] {"4", "5", "6"});  
Choices lastThree = new Choices(new string[] {"7", "8", "9"});  

Choices keyPadChoices = new Choices(new GrammarBuilder[] {firstThree, nextThree, lastThree, new Choices("0")});  

builder = new GrammarBuilder(keyPadChoices);  
document = new SrgsDocument(builder);  

document.Mode = SrgsGrammarMode.Dtmf;  
grammar = new Grammar(document);   

설명

에 대 한 입력된 모드를 SrgsDocument 에 의해 결정 됩니다 해당 Mode 속성입니다. 기본 입력된 모드는 문법을 정의한 나타내는 음성은 SrgsDocument 음성 입력와 일치 합니다.

Dtmf 모드는 문법을 이중 톤 Multi-frequency () dtmf 음성 대신 일치 됩니다 것을 나타냅니다. 12는 대부분의 전화기에서 흔히 발견 되 16 dtmf 있습니다.

만들 때를 Grammar 에서 개체를 SrgsDocumentGrammar 개체에서 지정 된 입력의 형식과 일치 합니다 Mode 속성의 인스턴스를 가져옵니다 SrgsGrammarMode.

적용 대상

추가 정보