Partager via


ISpRecognizerLite::ReTrain

4/8/2010

This method prompts the user to re-enter a speech sample. This is logically equivalent to calling the Delete and then Train methods, however it may allow the engine to utilize implementation efficiencies.

Syntax

HRESULT  ReTrain (
  SPRECOGNITIONMETHOD eRM,
  SPTYPEHEADER* psth,
  IUnknown* pUnk
);

Parameters

  • eRM
    [in] Identifies which recognition method should be used.
  • psth
    [out][in] Pointer to information that identifies the pattern.

    Recognition method SPTYPEHEADER type

    SPRM_CONTINUOUSDIGIT

    SPT_NULL. This is ignored.

    SPRM_VOICETAG

    SPT_DWORD

  • pUnk
    [in] Pointer to a client callback interface. This parameter is currently NULL and ignored.

Return Value

Value Description

S_OK

Success

E_NOTIMPL

Not implemented.

SP_INSUFFICIENT_DATA

A sample was successfully obtained, however the recognition needs to be performed again; that is, the client should call the Train method again.

Otherwise, it returns an appropriate failure code from the return code list.

Remarks

The engine should not provide any training or delete UI unless it is required and noted in the SPPT_CUSTOMUI property. Should the engine require another training sample, it should return SP_INSUFFICIENT_DATA and return to the client. At that point, the client can update its UI and call the ReTrain or Train methods again.

Requirements

Header itspeech.h
Windows Embedded CE Windows CE 3.0 and later
Windows Mobile Smartphone 2002 and later

See Also

Reference

ISpRecognizerLite