Prosody speech processing: API: sm_record_how_terminated

This function is only in Prosody version 1 (see also the conversion guide for further details).

Prototype Definition

int sm_record_how_terminated(struct sm_record_how_terminated_parms *howtermp)

Parameters

*howtermp
a structure of the following type:
typedef struct sm_record_how_terminated_parms {
	tSMChannelId channel;					/* in */
	enum kSMRecordHowTerminated {
		kSMRecordHowTerminatedNotYet,
		kSMRecordHowTerminatedLength,
		kSMRecordHowTerminatedMaxTime,
		kSMRecordHowTerminatedSilence,
		kSMRecordHowTerminatedAborted,
		kSMRecordHowTerminatedError,
	} termination_reason;					/* out */
	tSM_UT32 termination_octets;				/* out */
} SM_RECORD_HOW_TERMINATED_PARMS;

Description

This call allows an application to determine if and how the last recording on channel channel was terminated. On version 2 (TiNG) this functionality is provided by sm_record_status().

Fields

channel (Only in Prosody version 1)
The channel which is recording.
termination_reason (Only in Prosody version 1)
One of these values:
kSMRecordHowTerminatedNotYet
Recording not yet completed.
kSMRecordHowTerminatedLength
The max_octets criterion specified to sm_record_start() was satisfied.
kSMRecordHowTerminatedMaxTime
The max_elapsed_time criterion specified to sm_record_start() was satisfied.
kSMRecordHowTerminatedSilence
The max_silence criterion specified to sm_record_start() was satisfied. The termination_octets field will indicate approximately how many octets of recorded silence were present at the end of the recording.
kSMRecordHowTerminatedAborted
sm_record_abort() was invoked.
kSMRecordHowTerminatedError
An error occurred.
termination_octets (Only in Prosody version 1)
The amount of data representing silence at the end of the recording (only valid if termination_reason was kSMRecordHowTerminatedSilence).

Returns

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


This function is part of the Prosody speech processing API.