SrgsGrammarMode Wyliczenie

Definicja

Wskazuje typ danych wejściowych, które będą zgodne z gramatyką zdefiniowaną przez SrgsDocument .

public enum class SrgsGrammarMode
public enum SrgsGrammarMode
type SrgsGrammarMode = 
Public Enum SrgsGrammarMode
Dziedziczenie
SrgsGrammarMode

Pola

Dtmf 1

Obiekt będzie odpowiadać mowę DTMF podobnej do tych znalezionych SrgsDocument w telefonie, a nie mowy.

Voice 0

Obiekt SrgsDocument będzie odpowiadać wejściom mowy.

Przykłady

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

Uwagi

Tryb wejściowy dla obiektu SrgsDocument zależy od jego Mode właściwości. Domyślny tryb wprowadzania to Voice( Głos), co oznacza, że gramatyka zdefiniowana przez wartość SrgsDocument będzie odpowiadać wejściom mowy.

Tryb Dtmf wskazuje, że gramatyka będzie dopasowana Dual-Tone multi-Frequency (DTMF) zamiast mowy. Istnieje 16 dtmfów, z których 12 często znajduje się w większości telefonów.

Podczas tworzenia obiektu Grammar z obiektu obiekt będzie odpowiadać typowi danych wejściowych określone przez właściwość SrgsDocument , która pobiera wystąpienie klasy Grammar Mode SrgsGrammarMode .

Dotyczy

Zobacz też