Prosody signal path processing: API: sm_path_tonedetect

Prototype Definition

int sm_path_tonedetect(struct sm_path_tonedetect_parms *tdparms)

Parameters

*tdparms
a structure of the following type:
typedef struct sm_path_tonedetect_parms {
	tSMPathId path;						/* in */
	tSM_INT elim;						/* in */
	enum kSMPathToneDetectMode {
		kSMPathToneDetectModeNone,
		kSMPathToneDetectModeMinDurationNoMinimum,
		kSMPathToneDetectModeMinDuration40,
		kSMPathToneDetectModeMinDuration64,
	} min_duration;						/* in */
	tSM_INT tone_set_id;					/* in */
} SM_PATH_TONEDETECT_PARMS;

Description

Configures a tone detector on signal path. Detected tones are reported through sm_path_status(). Tones that are detected may optionally be eliminated. When eliminating tones, the signal is delayed by small amount so entire tone can be eliminated.

Requires the module td to be loaded.

Fields

path
The signal path to be configured
elim
Enables (non-zero) or disables (zero) elimination of detected tones from signal.
min_duration
Tone detection mode - see sm_listen_for() for more details. One of these values:
kSMPathToneDetectModeNone
Tone detection disabled.
kSMPathToneDetectModeMinDurationNoMinimum
Simple tone detection enabled, no minimum period.
kSMPathToneDetectModeMinDuration40
Robust detection of tones with duration as short as 40mS.
kSMPathToneDetectModeMinDuration64
Simple tone detection enabled, tone must be valid for 64ms to be detected.
tone_set_id
Selects tone set used for tone detection - use same as for active_tone_set_id field in sm_listen_for().

Returns

0 if call completed successfully, otherwise a standard error.


This function is part of the Prosody signal path processing API.