Prosody speech processing: API: sm_add_output_freq

Prototype Definition

int sm_add_output_freq(struct sm_output_freq_parms *freqp)

Parameters

*freqp
a structure of the following type:
typedef struct sm_output_freq_parms {
	tSMModuleId module;					/* in */
	double freq;						/* in */
	double amplitude;					/* in */
	tSM_INT id;						/* out */
} SM_OUTPUT_FREQ_PARMS;

Description

This call may be used to add a component frequency to the repertoire of those supported by the given module. On return id will be set to an identifier for the new component frequency. This id may be used as a parameter to sm_add_output_tone() when defining new output tones supported by the module.

The frequency freq must be specified in Hz and be in the range from 150 Hz to 3600 Hz. The amplitude amplitude must be specified in dBm0 (according to CCITT G.711) and be in the range from -35 dBm0 to +3 dBm0.

See Prosody speech processing: pre-loaded output tones, for list of predefined component frequencies.

The database of tones is in the API library which is part of the application. Consequently, a very large number of tones can usually be added before running out of resources.

Fields

module
The module whose repertoire is to be modified.
freq
The frequency of the frequency component to be added (Hz).
amplitude
The amplitude of the frequency component to be added (dBm0).
id
The identifier returned if the frequency component is added.

Returns

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


This function is part of the Prosody speech processing API.