SrgsGrammarMode Výčet

Definice

Určuje typ vstupu, který bude gramatika definovaná objektem SrgsDocument odpovídat.

public enum class SrgsGrammarMode
public enum SrgsGrammarMode
type SrgsGrammarMode = 
Public Enum SrgsGrammarMode
Dědičnost
SrgsGrammarMode

Pole

Dtmf 1

Objekt SrgsDocument se bude shodovat s tóny DTMF, které jsou podobné těm, které se nacházejí na telefonu, místo řeči.

Voice 0

Objekt SrgsDocument bude odpovídat vstupu řeči.

Příklady

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);   

Poznámky

Režim vstupu objektu SrgsDocument je určen jeho Mode vlastností. Výchozí režim vstupu je Voice (Hlas), který označuje, že gramatika definovaná objektem bude odpovídat SrgsDocument vstupu řeči.

Režim Dtmf označuje, že gramatika bude odpovídat Dual-Tone s více frekvencemi (DTMF) místo řeči. K dispozici je 16 tónů DTMF, z nichž 12 se běžně nachází ve většině telefonů.

Při vytváření objektu z objektu se objekt bude shodovat s typem vstupu určeným vlastností Grammar , která získá instanci SrgsDocument Grammar Mode SrgsGrammarMode .

Platí pro

Viz také