SrgsGrammarMode Enumeração
Definição
Indica o tipo de entrada à qual a gramática, definida pelo SrgsDocument, corresponderá.Indicates the type of input that the grammar, defined by the SrgsDocument, will match.
public enum class SrgsGrammarMode
public enum SrgsGrammarMode
type SrgsGrammarMode =
Public Enum SrgsGrammarMode
- Herança
Campos
| Dtmf | 1 | O objeto SrgsDocument corresponderá tons DTMF semelhantes aos encontrados em um telefone, em vez de fala.The SrgsDocument object will match DTMF tones similar to those found on a telephone, instead of speech. |
| Voice | 0 | O objeto SrgsDocument corresponderá à entrada de fala.The SrgsDocument object will match speech input. |
Exemplos
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);
Comentários
O modo de entrada para um SrgsDocument é determinado por sua Mode propriedade.The input mode for an SrgsDocument is determined by its Mode property. O modo de entrada padrão é Voice, que indica que a gramática definida pelo SrgsDocument corresponderá à entrada de fala.The default input mode is Voice, which indicates that the grammar defined by the SrgsDocument will match speech input.
O modo DTMF indica que uma gramática corresponderá a Dual-Tone tons de múltiplas frequência (DTMF) em vez de fala.The Dtmf mode indicates that a grammar will match Dual-Tone Multi-Frequency (DTMF) tones instead of speech. Há 16 tons de DTMF, 12 dos quais normalmente são encontrados na maioria dos telefones.There are 16 DTMF tones, 12 of which are commonly found on most telephones.
Quando você cria um Grammar objeto de um SrgsDocument , o Grammar objeto corresponde ao tipo de entrada especificado pela Mode propriedade, que obtém uma instância de SrgsGrammarMode .When you create a Grammar object from an SrgsDocument, the Grammar object will match the type of input specified by the Mode property, which gets an instance of SrgsGrammarMode.