Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

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.

<sapi:subset 
  sapi:match="matchingMode"> 
</sapi:subset>

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 :

  • ordered-subset. The entire phrase will be recognized if one or more words in the speech input occur in the same order as in the phrase, and the relative order of the recognized words is the same as in the phrase. Speech input may consist of only prepositions and articles.

  • ordered-subset-content-required. Same as ordered-subset, except speech input cannot consist of only prepositions and articles.

  • subsequence. Recognition of the phrase will occur if one or more words in the speech input occur in the exact same sequence as in the phrase. Speech input may consist of only prepositions and articles.

  • subsequence-content-required. Same as subsequence, except speech input cannot consist of only prepositions and articles.

Important note Important

When using the sapi:subset element, you must include the following declaration in the grammar Element: xmlns:sapi=http://schemas.microsoft.com/Speech/2002/06/SRGSExtensions.

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.

Recognition Results for Subsets

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="http://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>

Show:
© 2014 Microsoft