Share via


Note

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

Microsoft Speech Platform

ISpObjectTokenCategory::SetDefaultTokenId

ISpObjectTokenCategory::SetDefaultTokenId sets a specific token ID as the default for the category.

<pre IsFakePre="true" xmlns="http://www.w3.org/1999/xhtml"> <strong>HRESULT SetDefaultTokenId(</strong> <strong> LPCWSTR </strong> *<em>pszTokenId</em> <strong>);</strong> </pre>

Parameters

  • pszTokenId
    [in] The null-terminated string that is the full registry path for the token ID to set as the default. For example, to specify a token that supports French, specifiy this parameter as follows: HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Speech Server\\v11.0\\Voices\\Tokens\\TTS_MS_fr-FR_Hortense_11.0.

Return Values

Value Description
S_OK Function completed successfully.
SPERR_UNINITIALIZED Data key interface is not initialized.
E_INVALIDARG pszTokenId is invalid or bad.
FAILED(hr) Appropriate error message.

Remarks

The defaults are stored either directly in the category by setting the DefaultTokenID value in the category data key, or indirectly by the DefaultTokenIDLocation. Default tokens are discussed in Using Object Tokens and Categories.