IVCmdUserWord::ModifyTraining
This method specifies which templates are enabled for a particular phrase.
Syntax
HRESULT ModifyTraining( LPTSTR lpszPhrase, DWORD dwFlags);
Parameters
- lpszPhrase
- Long pointer to the null-terminated string that contains the phrase of interest.
- dwFlags
- Specifies a bitmask of flags. It is one of the following values:
- SRPHRASE_SI
- Specifies the speaker independent template.
- SRPHRASE_SD
- Specifies the speaker dependent template.
- SRPHRASE_SI_ENABLE
- Enables or disables a phrase on the speaker-independent template.
- SRPHRASE_SD_ENABLE
- Enables or disables a phrase on the speaker-dependent template.
- SRPHRASE_SD_ERASE
- Erases the speaker-dependent template for a phrase.
- SRPHRASE_PERMANENT
- When set, makes any changes permanent.
Return Values
- NOERROR
- The method successfully specified the templates that are enabled for a particular phrase.
- SRERR_PHRASENOTFOUND
- The phrase was not found in either template.
- SRERR_TEMPLATENOTFOUND
- The template is not available.
Remarks
Templates are enabled independently of each other. Either or both may be enabled at any time. When setting a flag to enable or disable a template, the corresponding flag to select the template must also be set. For example, to enable the speaker-dependent template, use SRPHRASE_SD | SRPHRASE_SD_ENABLE.