ISpObjectTokenCategory (Microsoft Speech Platform)

Microsoft Speech Platform SDK 11

Microsoft Speech Platform

ISpObjectTokenCategory

Each object token category represents a collection of similar tokens, such as voices, recognizers, and audio input devices. Categories may be created or manipulated with helper functions or methods from this interface. 

Each category has a Category ID that is unique and identifies only one type of object token. The set of available categories are listed in Token Category IDs. Category IDs are always null-terminated strings.

An application can create an SpObjectTokenCategory object, which implements this interface. Then it calls SetId in order to set the Category ID that this object is using. The application can then enumerate the object tokens associated with this category using EnumTokens. Applications can also locate and change the default object token for a category with the methods SetDefaultTokenId and GetDefaultTokenId.

ISpObjectTokenCategory inherits from ISpDataKey.

Implemented By
  • SpObjectTokenCategory object. This is the standard class used for categories in SAPI. The category and the list of associated tokens are stored in the registry.
How Created
  • Applications will normally create object token categories by directly creating the SpObjectTokenCategory class.
  • If the application is using the category to find an associated token that matches certain attributes, it is often easier to use the helper functions SpEnumTokens or SpFindBestToken.

 

Methods in Vtable Order

ISpObjectToken Methods Description
SetId Sets the category ID.
GetId Retrieves the token ID.
GetDataKey Gets the data key associated with a specific location.
EnumTokens Enumerates the tokens for the category.
SetDefaultTokenId Sets a specific TokenId as the default for the category.
GetDefaultTokenId Retrieves the default TokenId for the category.