Note

Please see Azure Cognitive Services for Speech documentation for the latest supported speech solutions.

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. Category IDs are always null-terminated strings. The following token category IDs are used with the Microsoft Speech Platform.

Category IDPurpose
SPCAT_AUDIOOUTAvailable audio output devices.
SPCAT_AUDIOINAvailable audio input devices.
SPCAT_VOICESAvailable voices.
SPCAT_RECOGNIZERSAvailable recognizers.

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. This is the standard class used for categories in the Speech Platform. 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.