Note

Please see Azure Cognitive Services for Speech documentation for the latest supported speech solutions.

Microsoft Speech Platform

SPRECOSTATE

SPRECOSTATE lists the possible states of the speech recognition (SR) engine.

<pre IsFakePre="true" xmlns="http://www.w3.org/1999/xhtml"> <strong>typedef enum SPRECOSTATE { SPRST_INACTIVE, SPRST_ACTIVE, SPRST_ACTIVE_ALWAYS, SPRST_INACTIVE_WITH_PURGE, SPRST_NUM_STATES } SPRECOSTATE;</strong> </pre>

Elements

  • SPRST_INACTIVE
    The engine and audio input are inactive and no audio is being read, even if there are active rules. The audio device will be closed in this state. 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 speech recognition will take place.
  • 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.
  • 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.
  • SPRST_NUM_STATES
    To be provided in a future release.