libsent/src/wav2mfcc/ss.c File Reference

Spectral subtraction. More...

#include <sent/stddefs.h>
#include <sent/mfcc.h>

Include dependency graph for ss.c:

Go to the source code of this file.

Functions

static boolean myread (void *buf, size_t unitbyte, int unitnum, FILE *fp)
float * new_SS_load_from_file (char *filename, int *slen)
float * new_SS_calculate (SP16 *wave, int wavelen, Value para, int *slen)


Detailed Description

Spectral subtraction.

Author:
Akinobu LEE
Date:
Thu Feb 17 17:19:54 2005
The actual subtraction will be performed in wav2mfcc-buffer.c and wav2mfcc-pipe.c. These functions are for estimating average spectrum of audio input, and file I/O for that.

Revision
1.4

Definition in file ss.c.


Function Documentation

static boolean myread ( void *  buf,
size_t  unitbyte,
int  unitnum,
FILE *  fp 
) [static]

Binary read function with byte swaping (assume file is BIG ENDIAN)

Parameters:
buf [out] read data
unitbyte [in] size of a unit in bytes
unitnum [in] number of unit to be read
fp [in] file pointer

Definition at line 44 of file ss.c.

float* new_SS_load_from_file ( char *  filename,
int *  slen 
)

Load a noise spectrum from file.

Parameters:
filename [in] path name of noise spectrum file
slen [out] length of the returned buffer
Returns:
a newly allocated buffer that holds the loaded noise spectrum.

Definition at line 65 of file ss.c.

Referenced by new_wav2mfcc(), and RealTimeInit().

float* new_SS_calculate ( SP16 wave,
int  wavelen,
Value  para,
int *  slen 
)

Compute average spectrum of audio input. This is used to estimate a noise spectrum from input samples.

Parameters:
wave [in] input audio data sequence
wavelen [in] length of above
para [in] parameter
slen [out] length of returned buffer
Returns:
a newly allocated buffer that contains the calculated spectrum.

Definition at line 109 of file ss.c.

Referenced by new_wav2mfcc().


Generated on Tue Dec 26 16:18:27 2006 for Julius by  doxygen 1.5.0