次の方法で共有


SPRECOSTATE (SAPI 5.3)

Microsoft Speech API 5.3

SPRECOSTATE

SPRECOSTATE lists the various states of the recognition engine.

  
    typedef enum SPRECOSTATE
{
    SPRST_INACTIVE,
    SPRST_ACTIVE,
    SPRST_ACTIVE_ALWAYS,
    SPRST_INACTIVE_WITH_PURGE,
    SPRST_NUM_STATES
} SPRECOSTATE;

Elements

  • SPRST_INACTIVE
    The engine and audio input are inactive and no audio is being read, even if there rules active. The audio device will be closed in this state. Normally an application should not set the state to SPRST_INACTIVE because when using the shared engine, recognition will be stopped for all applications, not just this one. An application can easily disable recognition on its contexts by calling ISpRecoContext::SetContextState.
  • SPRST_ACTIVE
    This state is the default and indicates that recognition will take place if there are any active rules. If a rule is active, audio will be read and passed to the SR engine and recognition will happen.
  • SPRST_ACTIVE_ALWAYS
    Indicates the audio is running regardless of the rule state. Even if there are no active rules, audio will still be read and passed to the engine. This state can be useful for applications if they want to receive volume level events (SPEI_SR_AUDIO_LEVEL), in order to display a VU-meter or similar.
  • SPRST_INACTIVE_WITH_PURGE
    Indicates the engine state will be set to inactive, but all active audio data is purged. This state is used when an application wishes to shut an engine down as quickly as possible, without waiting for it to finish processing any audio data that is currently buffered. This state should be used with care because it will affect all applications in the shared case.
  • SPRST_NUM_STATES
    To be provided in a future release.