Freigeben über


Alphanum Rule for Spanish (United States)

  Microsoft Speech Technologies Homepage

Retrieves any combination of up to 10 single digits and characters. The number of digits, characters, or a combination of digits and characters that can be retrieved is stated by the rule. Grouping is the ability of the Alphanum module to retrieve a group of digits. For example, the Digit4 rule retrieves "1234" when a user says doce treinta y cuatro.

Rules

Rule Name Description
Digit1 Retrieves 1 digit.
Digitn Retrieves n digits, where n can be 2–10, inclusive. Grouping allowed.
SimpleDigit1 Retrieves 1 digit.
SimpleDigitn Retrieves n digits, where n can be 2–10, inclusive. No grouping allowed.
Alphanum1 Retrieves 1 digit or character.
Alphanumn Retrieves n digits, characters, or a combination of digits and characters, where n can be 2–10, inclusive. Digit grouping allowed.
SimpleAlphanum1 Retrieves 1 digit and/or character.
SimpleAlphanumn Retrieves n digits, characters, or a combination of digits and characters, where n can be 2–10, inclusive. No digit grouping allowed.

Usage

<!-- using the SimpleAlphanum3 rule as an example -->
   <ruleref uri="cmnrules.cfg#SimpleAlphanum3" />

The grammar can be used as follows (using the SimpleAlphanum4 rule as an example):

<grammar version="1.0" mode="voice" root="Rule1" tag-format="semantics-ms/1.0" 
  xml:lang="es-US" xmlns="http://www.w3.org/2001/06/grammar" 
  xmlns:sapi="https://schemas.microsoft.com/Speech/2002/06/SRGSExtensions">
    <rule id="Rule1">
      <ruleref uri="cmnrules.cfg#SimpleAlphanum4" />
    <tag>$ = $$</tag>
    </rule>
</grammar>

JScript Object

$[Rulename]._value : string     //Where x is the number of digits for the rule

Examples: Digit4 rule

Example 1

User says: uno dos tres cuatro.

SML returned by the recognition engine:

<SML confidence="1.000" text="uno dos tres cuatro" utteranceConfidence="1.000">1234</SML>

Example 2

User says: doce treinta y cuatro. The result is the same as shown in Example 1 previously. Digit grouping allowed.

SML returned by the recognition engine:

<SML confidence="1.000" text="doce treinta y cuatro" utteranceConfidence="1.000">1234</SML>

Example 3

User says: ocho mil.

SML returned by the recognition engine:

<SML confidence="1.000" text="ocho mil" utteranceConfidence="1.000">8000</SML>

Example 4

User says: dos uno cero cero.

SML returned by the recognition engine:

<SML confidence="1.000" text="dos uno cero cero" utteranceConfidence="1.000">2100</SML>

Examples: Alphanum4 rule

Example 1

User says: dos uno cero cero.

SML returned by the recognition engine:

<SML confidence="1.000" text="dos uno cero cero" utteranceConfidence="1.000">2100</SML>

Example 2

User says: a. cero cero b.

SML returned by the recognition engine:

<SML confidence="1.000" text="a. cero cero b." utteranceConfidence="1.000">A00B</SML>

Note  When the speech recognition engine recognizes letters of the alphabet that are spoken as individual letters, the resulting SML expresses those letters as initials. When validating recognition strings containing individual letters using Speech Grammar Editor, or when using the Speech Debugging Console to emulate SML for strings containing individual letters, enter the letter followed by a period to indicate that the letter is being used individually, and not in the context of a word. For example, to validate the previous example using Speech Grammar Editor, type a. cero cero b in the Recognition string text box and click Check.

Example 3

User says: i. cinco veinte. Digit grouping allowed.

SML returned by the recognition engine:

<SML confidence="1.000" text="i. cinco veinte" utteranceConfidence="1.000">I520</SML>

See Also

Voice Mode Grammar Library | DTMF Mode Grammar Library