ISRAttributes::AutoGainEnableGet

HRESULT AutoGainEnableGet(DWORD *pdwAutoGain);

Retrieves the state of the automatic gain for the incoming audio stream.

Returns NOERROR if successful, or one of these error values:

E_INVALIDARG
E_OUTOFMEMORY
SRERR_NOTSUPPORTED
SRERR_VALUEOUTOFRANGE

pdwAutoGain

[out] Address of a variable that receives the automatic gain.

A value of 0 indicates that automatic gain is disabled. A value of 100 indicates that the speech-recognition engine always adjusts the gain, so that if the next utterance is spoken at the same level, the gain is set perfectly. A value between 0 and 100 moderates the automatic adjustments on a linear scale. For example, a pdwAudioGain value of 50 adjusts the gain to half the extent that the engine otherwise would.

When automatic gain is enabled, the speech-recognition engine may adjust the level at the end of an utterance and increase or decrease the gain. The engine adjusts the gain by using the IAudio::LevelGet and IAudio::LevelSet member functions to communicate with the audio-source object that represents the incoming audio stream.

If the audio source does not support IAudio::LevelSet, the application cannot set the automatic gain.