sapi:subset Element
Specifies a phrase and a matching mode that allows the entire phrase to be recognized when only a subset of that phrase is found in the speech input.
Syntax
<sapi:subset
sapi:match="matchingMode">
</sapi:subset>
Attributes
Attribute |
Description |
---|---|
sapi:match |
Takes one of the following four values that define the subset of the phrase that can be used to recognize the entire phrase :
|
Important
When using the sapi:subset element, you must include the following declaration in the grammar Element: xmlns:sapi=https://schemas.microsoft.com/Speech/2002/06/SRGSExtensions.
Remarks
By default, a speech recognition engine requires an exact match against an entire phrase specified in a grammar. The recognition engine can also match partial phrases using matching modes that are defined by values of the sapi:match attribute of a sapi:subset element.
The following table illustrates how each of the values for the sapi:match attribute affects recognition when speech input contains only a subset of the entire phrase contained in the sapi:subset element.
Example
The following is an SRGS XML grammar that demonstrates an example use of the sapi:subset element.
<grammar version="1.0" xml:lang="en-US" root="locomotion"
xmlns="http://www.w3.org/2001/06/grammar"
xmlns:sapi="https://schemas.microsoft.com/Speech/2002/06/SRGSExtensions">
<rule id="locomotion">
<sapi:subset sapi:match="subsequence"> a car the truck a boat that plane </sapi:subset>
</rule>
</grammar>