Partager via


DigitBlock Rules 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.

DigitBlock rules describe sequences of digit strings in length from two to four digits. For example, two zero (20), two three five four (2354), or twenty three fifty four (2354).

The length of the DigitBlock is encoded in the rule name. For example, the DigitBlock_2Digits rule recognizes strings of digits that are two digits in length.

All DigitBlock rules return a value of type string.

Rules

DigitBlock_2Digits

DigitBlock_3Digits

DigitBlock_4Digits

Usage

<ruleref uri="Library.grxml#DigitBlock_2Digits" type="application/srgs+xml"/>
<ruleref uri="Library.grxml#DigitBlock_3Digits" type="application/srgs+xml"/>
<ruleref uri="Library.grxml#DigitBlock_4Digits" type="application/srgs+xml"/>

The grammar can be used as follows (using the DigitBlock_3Digits 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="voice"
         root="Rule1" xmlns="http://www.w3.org/2001/06/grammar">
    <rule id="Rule1" scope="public">
        <ruleref uri="Library.grxml#DigitBlock_3Digits" type="application/srgs+xml"/>
    <tag>$ = $$</tag>
    </rule>
</grammar>

JScript Objects

$DigitBlock_2Digits._value: string [length 2]
$DigitBlock_3Digits._value: string [length 3]
$DigitBlock_4Digits._value: string [length 4]

Example: DigitBlock_2Digits

Example 1

User says: "un deux."

SML returned by the recognition engine.

<SML text="un deux" utteranceConfidence="1.000" confidence="1.000">12</SML>

Example: DigitBlock_3Digits

Example 1

User says: "deux quatre six."

SML returned by the recognition engine.

<SML text="deux quatre six" utteranceConfidence="1.000" confidence="1.000">246</SML>

Examples: DigitBlock_4Digits

Example 1

User says: "huit neuf z??ro z??ro."

SML returned by the recognition engine.

<SML text="huit neuf z??ro z??ro" utteranceConfidence="1.000" confidence="1.000">8900</SML>

Example 2

User says: "douze trente-quatre."

SML returned by the recognition engine.

<SML text="douze trente-quatre" utteranceConfidence="1.000" confidence="1.000">1234</SML>

See Also

Concepts

Voice Mode Grammar Library for French (Canada)