DtmfRecognitionEngine.AddTone Method
Adds a tone to the buffer for recognition against the loaded grammars.
Remarks
Warning
It is possible for a caller to send many simultaneous tones to a DTMF recognition engine which can cause it to take time to process. This processing time can cause the computer that is running the DTMF recognition engine to stop responding in a timely manner, much like a denial of service attack. It is recommended that the application put a limit on the total number of tones sent to a given instance of the DtmfRecognitionEngine class.
// Create the Recognizer
DtmfRecognizer dtmfRecognitionEngine = new DtmfRecognizer();
// Load a Grammar
Grammar grammar = new Grammar("C:\\SampleGrammar.xml");
dtmfRecognitionEngine.LoadGrammar(grammar);
// Add some tones
dtmfRecognitionEngine.AddTone(1);
dtmfRecognitionEngine.AddTone(2);
Overload List
Name | Description |
---|---|
DtmfRecognitionEngine.AddTone (Byte) |
Adds a tone to the buffer for recognition against the loaded grammars.
|
DtmfRecognitionEngine.AddTone (DtmfTone) |
Adds a tone to the buffer for recognition against the loaded grammars.
|
See Also
Reference
DtmfRecognitionEngine Class
DtmfRecognitionEngine Members
Microsoft.Speech.Recognition Namespace