USPhoneNumber Rule for Spanish (United States)

  Microsoft Speech Technologies Homepage

Retrieves a seven digit local telephone number with optional area code and one to five digit extensions. USPhoneNumber is composed of the following elements:

  • LocalNumber
  • AreaCode
  • Extension

A telephone number that is spoken as 11 digits with 1 as the first digit, is returned as a 10 digit telephone number (area code and local number). The prefix before the area code is not returned. A telephone number that is spoken as 11 digits must begin with a 1 or a noreco is returned. Eleven digit telephone numbers that begin with 9 are returned without the 9.

An extension is triggered and returned if a user indicates an extension following 7, 10, or 11 digits.

Digit groupings are supported. Grouping is the ability of the AlphaNum rule to retrieve a group of digits. For example, the Digit4 rule retrieves "1234" when a user says doce treinta y cuatro.

911 is supported.

Rule

USPhoneNumber

Usage

<ruleref uri="cmnrules.cfg#USPhoneNumber"/>

The grammar can be used as follows:

<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#USPhoneNumber"/>
    <tag>$ = $$</tag>
    </rule>
</grammar>

JScript Object

$USPhoneNumber.AreaCode._value : string (optional)
$USPhoneNumber.LocalNumber._value : string
$USPhoneNumber.Extension._value : string (optional)
$USPhoneNumber.X11._value : string

Examples: USPhoneNumber

Example 1

User says: cinco cinco cinco cero uno cero cero.

The utterance is treated as a local telephone number. Area code is not returned.

SML returned by the recognition engine:

<SML confidence="1.000" text="cinco cinco cinco cero uno cero cero" utteranceConfidence="1.000">
   <LocalNumber confidence="1.000" text="cinco cinco cinco cero uno cero cero">5550100</LocalNumber> 
</SML>

Example 2

User says: cinco cinco cinco cero cien.

The utterance is treated as a local telephone number. Area code is not returned. Digit grouping is illustrated.

SML returned by the recognition engine:

<SML confidence="1.000" text="cinco cinco cinco cero cien" utteranceConfidence="1.000">
   <LocalNumber confidence="1.000" text="cinco cinco cinco cero cien">5550100</LocalNumber> 
</SML>

Example 3

User says: cinco cinco cinco diez cero cero.

The utterance is treated as a local telephone number. Area code is not returned. Digit grouping is illustrated.

SML returned by the recognition engine:

<SML confidence="1.000" text="cinco cinco cinco diez cero cero" utteranceConfidence="1.000">
   <LocalNumber confidence="1.000" text="cinco cinco cinco diez cero cero">5551000</LocalNumber> 
</SML>

Example 4

User says: uno dos cero seis cinco cinco cinco cero uno cero cero.

The prefix before the area code is not returned. Area code and local number are returned.

SML returned by the recognition engine:

<SML confidence="1.000" text="uno dos cero seis cinco cinco cinco cero uno cero cero" utteranceConfidence="1.000">
   <AreaCode confidence="1.000" text="dos cero seis">206</AreaCode> 
   <LocalNumber confidence="1.000" text="cinco cinco cinco cero uno cero cero">5550100</LocalNumber> 
</SML>

Example 5

User says: dos cero seis cinco cinco cinco cero uno cero cero.

Area code and local number are returned.

SML returned by the recognition engine:

<SML confidence="1.000" text="dos cero seis cinco cinco cinco cero uno cero cero" utteranceConfidence="1.000">
   <AreaCode confidence="1.000" text="dos cero seis">206</AreaCode> 
   <LocalNumber confidence="1.000" text="cinco cinco cinco cero uno cero cero">5550100</LocalNumber> 
</SML>

Example 6

User says: uno ochocientos cinco cinco cinco cero uno cero cero.

The prefix before the area code is not returned. Area code and local number are returned.

SML returned by the recognition engine:

<SML confidence="1.000" text="uno ochocientos cinco cinco cinco cero uno cero cero" utteranceConfidence="1.000">
   <AreaCode confidence="1.000" text="ochocientos">800</AreaCode> 
   <LocalNumber confidence="1.000" text="cinco cinco cinco cero uno cero cero">5550100</LocalNumber> 
</SML>

Example 7

User says: cinco cinco cinco cero uno cero cero extensión uno dos tres.

The utterance of the word "extension" after 7 digits causes an Extension to be returned. Area code and local number are returned.

SML returned by the recognition engine:

<SML confidence="1.000" text="cinco cinco cinco cero uno cero cero extensión uno dos tres" utteranceConfidence="1.000">
   <LocalNumber confidence="1.000" text="cinco cinco cinco cero uno cero cero">5550100</LocalNumber> 
   <Extension confidence="1.000" text="uno dos tres">123</Extension> 
</SML>

Example 8

User says: cinco cinco cinco cero uno cero cero extensión mil doscientos.

The utterance of the word "extension" after 7 digits causes an Extension to be returned. Area code and local number are returned.

SML returned by the recognition engine:

<SML confidence="1.000" text="cinco cinco cinco cero uno cero cero extensión mil doscientos" utteranceConfidence="1.000">
   <LocalNumber confidence="1.000" text="cinco cinco cinco cero uno cero cero">5550100</LocalNumber> 
   <Extension confidence="1.000" text="mil doscientos">1200</Extension> 
</SML>

Example 9

User says: nueve uno uno.

SML returned by the recognition engine:

<SML confidence="1.000" text="nueve uno uno" utteranceConfidence="1.000">
   <X11 confidence="1.000" text="nueve uno uno">911</X11> 
</SML>

See Also

Voice Mode Grammar Library | DTMF Mode Grammar Library