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.
![]() |
Retrieves an amount in dollars and cents. The amount is returned as a numeral value. The currency unit is also returned. The grammar also reports any ambiguity to the application.
Rule
Currency
Usage
<ruleref uri="cmnrules.cfg#Currency" />
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#Currency" />
<tag>$ = $$</tag>
</rule>
</grammar>
JScript Objects
$Currency.Value._value : string
$Currency.Unit._value : string
Examples: Currency
Example 1
User says: cien. When the currency type is not mentioned, it is assumed to be dollars.
SML returned by the recognition engine:
<SML confidence="1.000" text="cien" utteranceConfidence="1.000">
<Unit>USDollars/Unit>
<Value confidence="1.000" text="cien">100.00</Value>
</SML>
Example 2
User says: dos dólares y quince centavos.
SML returned by the recognition engine:
<SML confidence="1.000" text="dos dólares y quince centavos" utteranceConfidence="1.000">
<Unit>USDollars</Unit>
<Value confidence="1.000" text="dos dólares y quince centavos">2.15</Value>
</SML>
Example 3
User says: noventa y nueve centavos.
SML returned by the recognition engine:
<SML confidence="1.000" text="noventa y nueve centavos" utteranceConfidence="1.000" type="Currency" name="Currency">
<Unit>USDollars</Unit>
<Value confidence="1.000" text="noventa y nueve centavos">0.99</Value>
</SML>
Example 4
User says: dos con noventa y nueve.
SML returned by the recognition engine:
<SML confidence="1.000" text="dos con noventa y nueve" utteranceConfidence="1.000">
<Unit>USDollars</Unit>
<Value confidence="1.000" text="dos con noventa y nueve">2.99</Value>
</SML>
.jpg)