Prosody speech processing: API: sm_onhook_listen_for

Prototype Definition

int sm_onhook_listen_for(struct sm_onhook_listen_for_parms *listenp)

Parameters

*listenp
a structure of the following type:
typedef struct sm_onhook_listen_for_parms {
	tSMChannelId channel;					/* in */
	tSM_INT enable;						/* in */
	double pre_pulse_max_power;				/* in */
	double pulse_min_power;					/* in */
	double post_pulse_floor;				/* in */
	double latitude;					/* in */
	double count_ratio;					/* in */
	double total_ratio;					/* in */
	tSM_INT max_duration;					/* in */
} SM_ONHOOK_LISTEN_FOR_PARMS;

Description

When the detector has determined that the analogue telephone has gone 'on-hook' the recognition event associated with the channel is set and a subsequent call to sm_get_recognised() will return the state kSMRecognisedOnHook.

The module onhook is required.

Fields

channel
The channel on which to listen.
enable
Indicator of whether on-hook detection is to be enabled (non-zero) or disabled (zero).
pre_pulse_max_power
The pre pulse maximum power (in dBm0). If zero is specified, the default of -48.0 is used.
pulse_min_power
The pulse minimum power (in dBm0). If zero is specified, the default of -18.0 is used.
post_pulse_floor
The post pulse power floor (in dBm0). If zero is specified, the default of -42.0 is used.
latitude
The convergence latitude (in dB). If zero is specified, the default of -6.0 is used.
count_ratio
The minimum count ratio. If zero is specified, the default of 4.0 is used.
total_ratio
The minimum total ratio. If zero is specified, the default of 4.0 is used.
max_duration
The maximum post pulse duration (in mS). If zero is specified, the default of 60 is used.

Returns

0 if call completed successfully, otherwise a standard error.


This function is part of the Prosody speech processing API.