Note

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

Microsoft Speech Platform

ISpObjectTokenCategory::SetId

ISpObjectTokenCategory::SetId sets the category ID.

This method may be called only once. If called more than once, SPERR_ALREADY_INITIALIZED will return.

<pre IsFakePre="true" xmlns="http://www.w3.org/1999/xhtml"> <strong>HRESULT SetId(</strong> <strong> LPCWSTR </strong> *<em>pszCategoryId</em>, <strong> BOOL</strong> <em>fCreateIfNotExist</em> <strong>);</strong> </pre>

Parameters

  • pszCategoryId
    [in] The null-terminated string name of category to set. Categories defined by the Speech Platform are listed in ISpObjectTokenCategory.
  • fCreateIfNotExist
    [in] Indicates creating the category if one is not already present. TRUE creates the entry. FALSE does not.

Return Values

Value Description
S_OK Function completed successfully.
SPERR_ALREADY_INITIALIZED Category interface is already initialized.
E_INVALIDARG pszCategoryId is invalid or bad.
FAILED(hr) Appropriate error message.