Prosody speech processing: API: sm_catsig_listen_for

Prototype Definition

int sm_catsig_listen_for(struct sm_catsig_listen_for_parms *listenp)

Parameters

*listenp
a structure of the following type:
typedef struct sm_catsig_listen_for_parms {
	tSMChannelId channel;					/* in */
	enum kBESPCatSigAlg {
		kBESPCatSigAlgLiveSpeaker=1,
		kBESPCatSigAlgLiveSpeakerTone,
		kBESPCatSigAlgLiveSpeakerToneReport,
	} catsig_alg_id;						/* in */
	tSM_INT abort_catsig_alg;				/* in */
} SM_CATSIG_LISTEN_FOR_PARMS;

Description

If this call is invoked with abort_catsig_alg set to zero and catsig_alg_id set to identifier for a signal categorisation algorithm then this call invokes a signal categorisation algorithm on the given channel input. Once enough of the signal has been processed in order to classify it into a definite category then the application is notified and it can then retrieve an indication of the signal category by calling sm_get_recognised().

If a recognition event has been previously associated with channel (see sm_channel_set_event()), then the driver will notify the application with that event whenever a signal has been categorised.

If the signal cannot be categorised, then no event will occur. Thus an application would normally timeout if no categorisation event occurs within a reasonable time. In order to cancel a signal categorisation algorithm job, the call should be invoked with abort_catsig_alg set to 1.

Fields

channel
The channel whose input is to be analysed.
catsig_alg_id
The signal categorisation algorithm to use. One of these values:
kBESPCatSigAlgLiveSpeaker
Distinguish a signal coming from a live speaker from one coming from an answering machine. In the result returned by sm_get_recognised() the param1 field contains the value 0 when a machine has been detected and 1 when a live speaker has been detected. Requires the module ansdet to have been downloaded.
kBESPCatSigAlgLiveSpeakerTone
Distinguish a signal coming from a live speaker from one coming from an answering machine, ignoring any initial tones. In the result returned by sm_get_recognised() the param1 field contains the value 0 when a machine has been detected and 1 when a live speaker has been detected. Requires the module td to have been downloaded.
kBESPCatSigAlgLiveSpeakerToneReport
Distinguish a signal coming from a live speaker from one coming from an answering machine, ignoring any initial tones. In the result returned by sm_get_recognised() the param1 field contains the value 0 when a machine has been detected, 1 when a live speaker has been detected, 2 when a tone start has been detected and 3 when a tone end has been detected. Requires the module td to have been downloaded.
abort_catsig_alg
Indicator of whether to abort signal categorisation on this channel (non-zero) or not (zero).

Returns

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


This function is part of the Prosody speech processing API.