libsent/src/adin/zmean.c File Reference

Remove DC offset from input speech. More...

#include <sent/adin.h>

Go to the source code of this file.

Functions

void zmean_reset ()
 Reset status.
void sub_zmean (SP16 *speech, int samplenum)
 Remove DC offset.

Variables

static int zlen = 0
 Current recorded length for DC offset estimation.
static float zmean = 0.0
 Current mean.


Detailed Description

Remove DC offset from input speech.

These function removes DC offset from input speech, like the ZMEANSOURCE feature in HTK.

The estimation method of DC offset depends on the type of input device. On file input, the mean of entire samples is used as estimated offset. On microphone input and network input, The first ZMEANSAMPLES samples in the input stream are used to estimate the offset, and the value will be used for the rest of the input.

Author:
Akinobu LEE
Date:
Sun Feb 13 20:31:23 2005
Revision
1.1.1.1

Definition in file zmean.c.


Function Documentation

void sub_zmean ( SP16 speech,
int  samplenum 
)

Remove DC offset.

The DC offset is estimated by the first samples after zmean_reset() was called. If the first input segment is longer than ZMEANSAMPLES, the whole input is used to estimate the zero mean. Otherwise, the zero mean will continue to be updated until the read length exceed ZMEANSAMPLES.

Parameters:
speech [I/O] input speech data, will be subtracted by DC offset.
samplenum [in] length of above.

Definition at line 70 of file zmean.c.

Referenced by adin_cut().


Generated on Tue Dec 18 16:01:38 2007 for Julius by  doxygen 1.5.4