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="fr-CA" 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: cent. When the currency type is not mentioned, it is assumed to be dollars.
SML returned by the recognition engine:
<SML confidence="1.000" text="cent" utteranceConfidence="1.000">
<Unit>CADollars</Unit>
<AlternativeUnit>USDollars</AlternativeUnit>
<Value text="cent" confidence="1.000">100.00</Value>
</SML>
Example 2
User says: deux dollars et quinze cents.
SML returned by the recognition engine:
<SML confidence="1.000" text="deux dollars et quinze cents" utteranceConfidence="1.000">
<Unit>CADollars</Unit>
<AlternativeUnit>USDollars</AlternativeUnit>
<Value confidence="1.000">2.15</Value>
</SML>
Example 3
User says: quatre-vingt-dix-neuf cents.
SML returned by the recognition engine:
<SML confidence="1.000" text="quatre-vingt-dix-neuf cents" utteranceConfidence="1.000">
<Unit>CADollars</Unit>
<AlternativeUnit>USDollars</AlternativeUnit>
<Value confidence="1.000">0.99</Value>
</SML>
Example 4
User says: deux quatre-vingt-dix-neuf.
SML returned by the recognition engine:
<SML confidence="1.000" text="deux quatre-vingt-dix-neuf" utteranceConfidence="1.000">
<Unit>CADollars</Unit>
<AlternativeUnit>USDollars</AlternativeUnit>
<Value text="deux" confidence="1.000">2.99</Value>
<AmbiguityScalingFactor>100</AmbiguityScalingFactor>
</SML>
.jpg)