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,
	} 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.

Only on Prosody version 1: Signal categorisation algorithms can be run in conjunction with DTMF detection, but not with input or output type jobs such as record, replay, or DTMF dial.
Only on Prosody S: Not supported by Prosody S.

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.
Only on Prosody version 2 (TiNG): Requires the module ansdet to have been downloaded.
kBESPCatSigAlgLiveSpeakerTone
Only on Prosody version 2 (TiNG): Distinguish a signal coming from a live speaker from one coming from an answering machine, ignoring any initial tones if tone detection is occuring on the same channel. 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.
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.