Note

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

Microsoft Speech Platform

ISpObjectToken

The ISpObjectToken interface handles object token entries. A token is an object that represents a resource installed on a computer by the Microsoft Speech Platform, such as a Recognizer or a Voice.

A token provides an application a simple way to inspect the various attributes of a resource without having to instantiate it. The Language attribute of a recognizer, and the Gender attribute of a voice are examples of attributes of resources. Applications can find the best token that matches certain attributes by using the SpFindBestToken function. For more information and examples for developing with tokens, see Object Tokens and Categories Overview and Using Object Tokens and Categories.

Implemented By

SpObjectToken object. This is the standard class used for all existing object tokens in the Speech Platform. The data for each object token is stored in the registry.

How Created

  • Applications will normally create object tokens from an object token enumerator or helper function, rather than by directly creating them.
  • Various API methods also return an object token referring to a specific type of resource, for example, ISpRecognizer::GetRecognizer returns the object token associated with the current recognition engine, and ISpVoice::GetVoice returns the object token referring to the current TTS engine.

ISpObjectToken inherits from ISpDataKey.

Methods in Vtable Order

ISpObjectToken Methods Description
SetId Sets the category identifier for object token.
GetId Retrieves the object identifier for an object token.
GetCategory Retrieves the category for a specified token if one is available.
CreateInstance Creates an instance of an object.
GetStorageFileName Retrieves the object token file name.
RemoveStorageFileName Removes the object token file name.
Remove Removes an object token.
IsUISupported Determines if the UI associated with the object is supported.
DisplayUI Displays the UI associated with the object.
MatchesAttributes Determines if an object token supports a specified attribute.

Remarks

Tokens are organized by category in the registry. See ISpObjectTokenCategory.