Prosody speech processing: API: sm_record_agc_adjust

Prototype Definition

int sm_record_agc_adjust(struct sm_record_agc_adjust_parms *recadjp)

Parameters

*recadjp
a structure of the following type:
typedef struct sm_record_agc_adjust_parms {
	tSMChannelId channel;					/* in */
	tSM_INT gain;						/* in */
} SM_RECORD_AGC_ADJUST_PARMS;

Description

Sets the gain of a recording which is using automatic gain control (AGC) to a specified value. This value will then be modified by the AGC algorithm to adapt to the strength of the signal being received.

It may be useful to set the gain when you know that the signal strength has suddenly changed and the standard AGC adaptation is not fast enough. However, if the gain is set too large, the signal will be distorted by clipping, whereas if the gain is too small, the signal will be attenuated to the point where it disappears. Therefore the gain should only be adjusted when there is good reason to believe the AGC algorithm will be inadequate.

When the AGC algorithm starts, it passes the signal through unchanged (i.e. a gain value of 0dB). As it monitors the signal, it adjusts this gain as necessary to make the signal approach a target of approximately -12dBm0.

Fields

channel
The channel which is recording.
gain
The gain value to set AGC to (in dB).

Returns

0 if call completed successfully, otherwise a standard error such as:


This function is part of the Prosody speech processing API.