Compartir a través de


SPDUI_RecoProfileProperties (Windows CE 5.0)

Send Feedback

This variable defines the string for displaying the properties associated with a specific recognition profile.

It is not a SAPI 5 compliance requirement for a speech recognition engine to implement UI for SPDUI_RecoProfileProperties.

When to Implement

When writing a speech engine for the desktop or a graphical environment, users can modify settings for specific run time environments (for example, mobile versus desktop, noisy versus quiet, fast versus slow computer, and so on).

Use the Speech Control Panel to change settings for all installed SAPI 5-compliant Text-To-Speech and Speech Recognition Engines. Choose Settings to change settings on a per-user/per-engine basis. Use SPDUI_RecoProfileProperties to directly access each Engine's Recognition Profile Settings UI. If the engine does not support the Recognition Profile Properties UI (see ISpTokenUI::IsUISupported), then the Settings button will be unavailable.

When to Access

The application could display a button or menu item for environment profile settings that accessed SPDUI_RecoProfileProperties. If the application can be used in either noisy or quiet environments, the user could be prompted to update the current recognition profile to reflect their specific environment (see ISpRecognizer::DisplayUI). Users should be informed that changes made within the engine properties UI will affect only one engine, and will not affect other users.

For information on creating new recognition profiles, see the helper function SpCreateNewToken (by Category Id).

#define SPDUI_RecoProfileProperties        L"RecoProfileProperties"

Example

The following code snippet illustrates the use of ISpTokenUI::IsUISupported using SPDUI_RecoProfileProperties.

HRESULT hr = S_OK;

// get the default speech recognizer token
hr = SpGetDefaultTokenFromCategoryId(SPCAT_RECOGNIZERS, &cpObjectToken);
// Check hr

// get the object token's UI
hr = cpObjectToken->QueryInterface(&cpTokenUI);
// Check hr

// check if the default speech recognizer has UI for its portion of the recognition profile
hr = cpTokenUI->IsUISupported(SPDUI_RecoProfileProperties, NULL, NULL, NULL, &fSupported);
// Check hr

// if fSupported == TRUE, then the default speech recognizer has UI for its portion of the recognition profile
The following code snippet illustrates the use of ISpRecognizer::DisplayUI using SPDUI_RecoProfileProperties.

HRESULT hr = S_OK;

// display recognition profile properties UI for the current recognizer
hr = cpRecognizer->DisplayUI(MY_HWND, MY_APP_RECO_PROFILE_PROPERTIES, SPDUI_RecoProfileProperties, NULL, NULL);
// Check hr

See Also

SAPI Global Variables

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.