DTMF Mode Grammar Library for French (Canada)

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

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.

The following table shows the rules contained in the DTMF library and descriptions of what the rules recognize.

Rules

Rule Description

digit

Retrieves the numeric value of a single telephone keypad press where the key pressed is in the range of 0 to 9 inclusive.

numeral_date_w_year

Retrieves the numeric value of a sequence of seven telephone keypad presses representing a two-digit month number, followed by a two-digit day number, followed by a four-digit year number. For descriptions of the valid number ranges for month, day, and year, see the Month, Day, and Year rules.

numeral_date_wo_year

Retrieves the numeric value of a sequence of four telephone keypad presses representing a two-digit month number followed by a two-digit day number. For descriptions of the valid number ranges for month and day, See the Month and Day rules.

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 of 01 to 12 inclusive.

Day

Retrieves the numeric value of a sequence of two telephone keypad presses where the sequence is in the range of 01 to 31 inclusive.

digit_nonzero

Retrieves the numeric value of a single telephone keypad press where the key pressed is in the range of 1 to 9 inclusive.

Syntax

<!-- using the digit rule as an example -->
<ruleref uri="DTMFRules.grxml#digit" />

The grammar can be used as follows (using the digit rule as an example).

<grammar xmlns:sapi="http://schemas.microsoft.com/Speech/2002/06/SRGSExtensions" xml:lang="fr-CA" tag-format="semantics-ms/1.0" version="1.0" mode="dtmf" xmlns="http://www.w3.org/2001/06/grammar" root="Rule1">
    <rule id="Rule1">
        <ruleref uri="DTMFRules.grxml#digit" />
    <tag>$ = $$</tag>
    </rule>
</grammar>

JScript Objects

$[Rulename]._value : string
$[Rulename]._attributes.text : string

Example: digit rule

User presses: 4.

SML returned by the recognition engine.

<SML text="4" utteranceConfidence="1.000" confidence="1.000">4</SML>

Example: numeral_date_w_year rule

User presses: 1 1 1 0 2 0 0 0.

SML returned by the recognition engine.

<SML text="1 1 1 0 2 0 0 0" utteranceConfidence="1.000" confidence="1.000">
    <Month confidence="1.000">11</Month>
    <Day confidence="1.000">10</Day>
    <Year confidence="1.000">2000</Year>    
</SML>

Example: numeral_date_wo_year rule

User presses: 1 0 1 9.

SML returned by the recognition engine.

<SML text="" utteranceConfidence="1.000" confidence="1.000">
    <Month confidence="1.000">10</Month>
    <Day confidence="1.000">19</Day>
</SML>

Example: Year rule

User presses: 2 0 0 7.

SML returned by the recognition engine.

<SML text="2 0 0 7" utteranceConfidence="1.000" confidence="1.000">2007</SML>

Examples: Month rule

Example 1

User presses: 0 7.

SML returned by the recognition engine.

<SML text="0 7" utteranceConfidence="1.000" confidence="1.000">7</SML>

Example 2

User presses: 1 1.

SML returned by the recognition engine.

<SML text="1 1" utteranceConfidence="1.000" confidence="1.000">11</SML>

Examples: Day rule

Example 1

User presses: 0 5.

SML returned by the recognition engine.

<SML text="0 5" utteranceConfidence="1.000" confidence="1.000">5</SML>

Example 2

User presses: 1 0.

SML returned by the recognition engine.

<SML text="1 0" utteranceConfidence="1.000" confidence="1.000">10</SML>

Example: digit_nonzero rule

User presses: 9.

SML returned by the recognition engine.

<SML text="9" utteranceConfidence="1.000" confidence="1.000">9</SML>

See Also

Concepts

Voice Mode Grammar Library for French (Canada)