Prosody speech processing: API: sm_condition_adjust

This function is only in Prosody version 2 (TiNG).

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 {
		kSMInputCondAdjustNonLinear,
		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 (Only in Prosody version 2 (TiNG))
The channel to which conditioning is being applied.
adjust_type (Only in Prosody version 2 (TiNG))
What sort adjustment to perform.
One of these values:
kSMInputCondAdjustNonLinear
Select whether linear or non-linear echo cancellation 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 the value one selecting non-linear cancellation. Non-linear echo cancellation suppresses the signal when it calculates that, after having the echo removed, there is no significant signal remaining.
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 (Only in Prosody version 2 (TiNG))
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.