marf.Preprocessing
Class Preprocessing

java.lang.Object
  extended bymarf.Preprocessing.Preprocessing
All Implemented Interfaces:
StorageManager
Direct Known Subclasses:
Dummy, Endpoint, FFTFilter

public abstract class Preprocessing
extends java.lang.Object
implements StorageManager

Class Preprocessing

Abstract Preprocessing Module

$Header: /cvsroot/marf/marf/src/marf/Preprocessing/Preprocessing.java,v 1.21 2003/04/20 06:27:46 mokhov Exp $


Field Summary
protected  Sample oSample
          Sample container
 
Fields inherited from interface marf.Storage.StorageManager
DUMP_BINARY, DUMP_CSV_TEXT, DUMP_GZIP_BINARY, DUMP_XML
 
Constructor Summary
protected Preprocessing(Sample poSample)
          Preprocessing Constructor
 
Method Summary
 boolean cropAudio(double pdStartingFrequency, double pdEndFrequency)
          Derivatives implement this method to crop arbitrary part of the audio sample.
 void dump()
          Not Implemented
 Sample getSample()
          Returns enclosed sample.
 boolean normalize()
          Normalization of incoming samples by amplitude.
abstract  boolean preprocess()
          Derivatives implement this method to do general preprocessing and perhaps calling removeNoise() and removeSilence().
 boolean removeNoise()
          Derivatives implement this method to remove noise from the sample.
 boolean removeSilence()
          Derivatives implement this method to remove silence.
 void restore()
          Not Implemented
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

oSample

protected Sample oSample
Sample container

Constructor Detail

Preprocessing

protected Preprocessing(Sample poSample)
Preprocessing Constructor

Parameters:
poSample - loaded sample by a SampleLoader
Method Detail

preprocess

public abstract boolean preprocess()
                            throws PreprocessingException
Derivatives implement this method to do general preprocessing and perhaps calling removeNoise() and removeSilence().

Returns:
boolean that sample has changed as a result of preprocessing
Throws:
PreprocessingException

removeNoise

public boolean removeNoise()
                    throws PreprocessingException
Derivatives implement this method to remove noise from the sample.

Returns:
boolean that sample has changed (noise removed)
Throws:
PreprocessingException

removeSilence

public boolean removeSilence()
                      throws PreprocessingException
Derivatives implement this method to remove silence.

Returns:
boolean that sample has changed (silence removed)
Throws:
PreprocessingException

normalize

public final boolean normalize()
                        throws PreprocessingException
Normalization of incoming samples by amplitude.

Returns:
true if the sample has been successfully normalized; false otherwise
Throws:
PreprocessingException

cropAudio

public boolean cropAudio(double pdStartingFrequency,
                         double pdEndFrequency)
                  throws PreprocessingException
Derivatives implement this method to crop arbitrary part of the audio sample.

Parameters:
pdStartingFrequency - double Fequency to start to crop from
pdEndFrequency - double Frequency to crop the sample to
Returns:
boolean true - cropped, false - not
Throws:
PreprocessingException

getSample

public final Sample getSample()
Returns enclosed sample.

Returns:
Sample object

dump

public void dump()
          throws java.io.IOException
Not Implemented

Specified by:
dump in interface StorageManager
Throws:
IOException

restore

public void restore()
             throws java.io.IOException
Not Implemented

Specified by:
restore in interface StorageManager
Throws:
IOException