Compartir a través de


ISpRecognizer::GetRecoProfile (Windows CE 5.0)

Send Feedback

This method gets the current recognition profile token.

A recognition profile represents a single user and training sessions on the system. The user can create, delete and set the current profile by using the Speech Control Panel. SAPI will always create the engine using the current default profile. This method can be used to find which profile is currently being used.

If an application needs to store information in a specific recognition profile, then it can use the ISpObjectToken::GetStorageFileName method.

HRESULT GetRecoProfile(ISpObjectToken** ppToken);

Parameters

  • ppToken
    [out] Address of a pointer to an object implementing ISpObjectToken that represents profile information.

Return Values

The following table shows the possible return values.

Value Description
S_OK Function completed successfully.
E_POINTER The ppToken is a bad or invalid pointer.
FAILED(hr) Appropriate error message.

Example

The following code snippet illustrates the use of this method to determine the profile name.

HRESULT hr = S_OK;
// get the current recognizer's recognition profile token
hr = cpRecognizer->GetRecoProfile(&cpObjectToken);
// Check hr
// get the reco profile name (such as the default value of the token)
hr = cpObjectToken->GetStringValue(NULL, &pwszRecoProfileName);
// Check hr

Requirements

OS Versions: Windows CE .NET 4.1 and later.
Header: Sapi.h, Sapi.idl.
Link Library: Sapilib.lib.

See Also

ISpRecognizer | SAPI Interfaces

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.