Prosody speech processing: API: sm_beep_listen_for

Prototype Definition

int sm_beep_listen_for(struct sm_beep_listen_for_parms *listenp)

Parameters

*listenp
a structure of the following type:
typedef struct sm_beep_listen_for_parms {
	tSMChannelId channel;					/* in */
	tSM_INT min_duration;					/* in */
	double upper_limit;					/* in */
	double lower_limit;					/* in */
} SM_BEEP_LISTEN_FOR_PARMS;

Description

A beep will be recognised if it lasts for at least min_duration milliseconds and the frequency is between lower_limit and upper_limit.

When a beep is recognised, the recognition event associated with the channel is set and the application can then retrieve the details for the recognised beep by calling sm_get_recognised().

Setting min_duration to zero disables the detection.

The modules td and beepdet are required.

Fields

channel
The channel on which to listen.
min_duration
The minumum beep duration (in milliseconds).
upper_limit
The upper frequency boundary (in Hz).
lower_limit
The lower frequency boundary (in Hz).

Returns

0 if call completed successfully, otherwise a standard error.


This function is part of the Prosody speech processing API.