Note
Please see Azure Cognitive Services for Speech documentation for the latest supported speech solutions.
Microsoft Speech Platform
Helper Function Examples
An application built on the Speech Platform needs to find tokens and instantiate objects that meet certain criteria from the resources available on a computer. Helper functions, distributed in the sphelper.h file, are the recommended way for applications to interact with tokens and categories whenever possible. The following table lists, describes, and provides examples of commonly used helper functions for working with tokens and categories.
Helper Function | Action | Example Helper Function Call |
---|---|
SpGetDefaultTokenFromCategoryID |
|
Creates the default token from a CategoryID. The last argument tells the Speech Platform to create the token if it does not currently exist. | |
SpFindBestToken |
|
Finds the most appropriate token given a set of required and optional criteria. For details on attribute matching see Enumerate and Inspect Tokens. | |
SpEnumTokens |
|
Returns a token enumerator containing all tokens meeting a set of required and optional attributes. Tokens in the enumerator are sorted in the order specified in Enumerate and Inspect Tokens. | |
SpCreateDefaultObjectFromCategoryID |
|
Creates the default object in a category, such as a Voice or Recognizer |
Table 1. Helper functions for tokens and categories
See Helper Functions for a complete listing of helper functions provided by the Speech Platform.