Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
![]() |
The Dual Tone Multi-frequency (DTMF) library contains a collection of preconstructed grammar rules. Each rule is designed to retrieve the numeric values associated with the DTMF pitches that are generated by a user pressing the keys of a telephone keypad. The DTMF library is a grammar resource that is used by ASP.NET Application Speech Controls.
Following is a list of the rules contained in the DTMF library, descriptions of what the rules recognize, and examples.
Rules
| Rule Name | Description |
|---|---|
| digit | Retrieves the numeric value of a single telephone keypad press where the key pressed is in the range 0 through 9 inclusive. |
| Year | Retrieves the numeric value of a sequence of four telephone keypad presses. |
| Month | Retrieves the numeric value of a sequence of two telephone keypad presses where the sequence is in the range from 01 through 12 inclusive. |
| Day | Retrieves the numeric value of a sequence of two telephone keypad presses where the sequence is in the range from 01 through 31 inclusive. |
| digit_nonzero | Retrieves the numeric value of a single telephone keypad press where the key pressed is in the range 1 through 9 inclusive. |
Usage
<!-- using the digit rule as an example -->
<ruleref uri="dtmfrules.cfg#digit" />
The grammar can be used as follows (using the digit rule as an example):
<grammar version="1.0" xmlns="http://www.w3.org/2001/06/grammar"
xml:lang="en-US" tag-format="semantics-ms/1.0">
<rule>
<ruleref uri="dtmfrules.cfg#digit" />
</rule>
</grammar>
JScript Objects
$[Rulename]._value : string
$[Rulename]._attributes.text : string
Example: digit rule
User presses: 4.
SML returned by the recognition engine:
<SML confidence="1.000" text="4" utteranceConfidence="1.000">4</SML>
Example: Year rule
User presses: 2 0 0 4.
SML returned by the recognition engine:
<SML confidence="1.000" text="2 0 0 4" utteranceConfidence="1.000">2004</SML>
Examples: Month rule
Example 1
User presses: 0 7.
SML returned by the recognition engine:
<SML confidence="1.000" text="0 7" utteranceConfidence="1.000">7</SML>
Example 2
User presses: 1 1.
SML returned by the recognition engine:
<SML confidence="1.000" text="1 1" utteranceConfidence="1.000">11</SML>
Examples: Day rule
Example 1
User presses: 0 5.
SML returned by the recognition engine:
<SML confidence="1.000" text="0 5" utteranceConfidence="1.000">5</SML>
Example 2
User presses: 1 0.
SML returned by the recognition engine:
<SML confidence="1.000" text="1 0" utteranceConfidence="1.000">10</SML>
Example: digit_nonzero rule
User presses: 9.
SML returned by the recognition engine:
<SML confidence="1.000" text="9" utteranceConfidence="1.000">9</SML>
.jpg)