Prosody speech processing: API: sm_condition_adjust

Prototype Definition

int sm_condition_adjust(struct sm_condition_adjust_parms *condp)

Parameters

*condp
a structure of the following type:
typedef struct sm_condition_adjust_parms {
	tSMChannelId channel;					/* in */
	enum kSMInputCondAdjust {
		kSMInputCondAdjustNonLinearWithMuting,
		kSMInputCondAdjustNonLinearWithCNG,
		kSMInputCondAdjustAGC,
		kSMInputCondAdjustFixGain,
	} adjust_type;						/* in */
	tSM_INT adjust_value;					/* in */
} SM_CONDITION_ADJUST_PARMS;

Description

Adjusts the input conditioning currently being performed on a channel.

Fields

channel
The channel to which conditioning is being applied.
adjust_type
What sort adjustment to perform. One of these values:
kSMInputCondAdjustNonLinearWithMuting
Select whether linear or non-linear echo cancellation with muting is performed. This adjustment is only valid if the input conditioning is currently kSMInputCondEchoCancelation. The adjust_value field selects which to use, with the value zero selecting linear echo cancellation, and other values selecting non-linear cancellation with muting. Non-linear echo cancellation with muting suppresses the signal when it calculates that, after having the echo removed, there is no significant signal remaining. This mode of operation is suitable for large-scale conferencing and some IVR applications, where it is important that the signal is completely muted whenever the caller is not speaking. Negative values represent the lower limit in dBm0. Positive values cause the default value of -42dBm0 to be used.
kSMInputCondAdjustNonLinearWithCNG
Select whether linear or non-linear echo cancellation with comfort noise generation is performed. This adjustment is only valid if the input conditioning is currently kSMInputCondEchoCancelation. The adjust_value field selects which to use, with the value zero selecting linear echo cancellation, and other values selecting non-linear cancellation with comfort noise generation (CNG). In this mode the echo canceller replaces any residual traces of echo with "comfort noise". This is most appropriate to IP gateway applications where background noise is desirable to maintain the illusion of continuity. Negative values represent the threshold in dBm0. Positive values cause the default value of -42dBm0 to be used.
kSMInputCondAdjustAGC
Selects whether or not AGC should be enabled according to the adjust_value field (zero is disable, one is enable). If AGC is disabled, the signal level is modified only to cancel the echo. If AGC is enabled, after the echo has been removed the signal is adjusted by applying a gain which varies in order to amplify weak signals more than strong ones.
kSMInputCondAdjustFixGain
Selects, based on the adjust_value field, whether or not the AGC gain can adapt (0) or is fixed (1) at its current value. This can be used after the AGC gain factor has adjusted itself to prevent further changes.
adjust_value
The value to use for this adjustment. The interpretation of this value depends on the adjustment type being performed with the exception of the value zero. For any particular adjustment type, there is a default which is used if no adjustment has been made. The value zero adjusts the conditioning back to that default.

Returns

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


This function is part of the Prosody speech processing API.