Voice API Programming Guide — June 2005 93
Recording and Playback
On Springware boards on Linux, use the following functions for transaction record:
dx_recm()
records voice data from two channels to a data file, memory, or custom device
dx_recmf()
records voice data from two channels to a single file
See the Voice API Library Reference for a full description of functions.
8.8 Silence Compressed RecordThe silence compressed record (SCR) feature is discussed in more detail in the following topics:
•Overview
•Enabling
•Encoding Methods Supported
8.8.1 Overview
The silence compressed record feature (SCR) enables recording with silent pauses eliminated. This
results in smaller recorded files with no loss of intelligibility.
On Springware boards, when the audio level is at or falls below the silence threshold for a
minimum duration of time, SCR begins. When a short burst of noise (glitch) is detected, the
compression does not end unless the glitch is longer than a specified period of time.
On DM3 boards, the SCR algorithm is based on energy detection and zero crossing. This SCR uses
different parameters than the standard SCR. Specifically, the Pre-Compensation and De-Glitch
parameters are no longer needed, and there are additional new parameters.
The SCR algorithm operates on one msec blocks of speech and uses a two-fold approach to
determine whether a sample is speech or silence. Two probability of speech values are calculated
using a zero crossing algorithm and an energy detection algorithm. These values are put together to
calculate a combined probability of speech.
The energy detection algorithm allows you to modify the background noise threshold range.
Signals above the high threshold are declared speech, and signals below the low threshold are
declared silence.
Speech or silence is declared based on the previous sample, the current combined probability of
speech in relation to the speech probability threshold and silence probability threshold parameters
and the trailing silence parameter.
8.8.2 Enabling
On DM3 boards, use dx_setparm( ) and the DXCH_SCRFEATURE define to turn silence
compressed record (SCR) on and off. Once enabled, voice record functions automatically record