
NO.:
W62410 API
VERSION:
A
PAGE
16
0.2 The SetThresholdLevels command.
Description:
The SetThresholdLevels command allows the host to set the different parameters for four
different telephone line signal detectors:
VAD threshold:
Every 30 milliseconds the energy of the voice-frame is
calculated (over the full bandwidth). If the energy exceeds the
threshold, set with this command, then the corresponding flag
will be set, otherwise, the flag is immediately reset. An
approximate formula to calculate the VAD threshold number
relative to dB is as follows with the signal level expressed in dB:
VADThresho
The above information is the exclusive intellectual property of Winbond Electronics and shall not be
disclosed, or reproduced without permission from Winbond.
Continuous tone time:
This parameter has to be specified in number of 30 ms frames.
Every 30 milliseconds the energy is calculated after bandpass
filtering (300 Hz to 720 Hz). If the energy was constantly higher
than the threshold specified by the continuos tone coefficient for
the specified number of frames by the continuous tone time
parameter then the corresponding flag will be set high. From the
moment the measured energy drops below the specified
threshold, then this flag will be immediately reset.
Continuous tone coefficient:
Every 30 milliseconds the energy of the voice-frame is
calculated.
[]
i
240
2
∑
=
i
sample
VoxEnergy
This energy is then divided by the continuous tone coefficient.
The number obtained by this division is now the continuous tone
threshold.
ient
oneCoeffic
ContinousT
VoxEnergy
old
ToneThresh
Continuous
=
After this, an IIR bandpass (300 Hz to 720 Hz) filter is applied to
the same voice-frame. The energy of this filtered voice-frame is
then calculated. This energy is then compared to the previously
calculated continuous tone threshold. If the energy of the filtered
voice-frame is higher than the continuous tone threshold then the
“P” flag is set to one. Otherwise, the “P” flag is set to zero. The
continuous tone coefficient can be changed in the range of
0x4000 to 0x7FFF. Increasing this coefficient increases the
sensitivity of the detection algorithm. The “P” flag is
immediately set/reset depending on the result of the calculation.
This parameter is also closely related to the continuous tone time
parameter.
The CHIPSET constantly checks for the presence of DTMF
tones. Four parameters can be set. By providing those four
parameters, the user can fine-tune the detection algorithm to his
own requirements. It allows the sensitivity level to be set, the
need of silence before DTMF tone detection, the number of
consecutive number of frames needed to validate the DTMF
code and the number of gaps allowed.
To validate a correct detection of a DTMF tone two major
conditions have to be met:
1) The same DTMF tone must be present during several
sub-frames.
DTMF sensitivity:
(
.
)
l
signalleve
e
ld
*
1067
12765
=