ocvolume.dsp
Class endPt

java.lang.Object
  |
  +--ocvolume.dsp.endPt

public class endPt
extends java.lang.Object

last modified: June 15, 2002
description: this is the detection of the noise and search for the spot where the acutal word is being sounded, and remove the noise from the sample.
calls: none
called by: volume, train
input: speech signal
output: modified speech signal


Constructor Summary
endPt()
           
 
Method Summary
static short[] absCut(short[] sample)
          a method to use this class
calls: zeroCrossingBoolean, avgEnergy, zeroCrossing, chopping
called by: volume
static int[] avgEnergy(short[] sample)
          5ms frame (80 samples / frame)
determent the noise location base on the energy
calls: none
called by: absCut
static short[] chopping(short[] sample, int[] cut)
          cut the sample into smaller part
calls: none
called by: absCut
static int[] zeroCrossing(short[] sample, int[] energy, boolean[] crossing)
          search for the end points based on zero-crossing and result from avgEnergy
calls: none
called by: absCut
static boolean[] zeroCrossingBoolean(short[] sample)
          Simply mark off the location of Zero-Crossing
calls: none
called by: absCut
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

endPt

public endPt()
Method Detail

absCut

public static short[] absCut(short[] sample)
a method to use this class
calls: zeroCrossingBoolean, avgEnergy, zeroCrossing, chopping
called by: volume

Parameters:
sample - the sample that's going to be modified
Returns:
modified sample

chopping

public static short[] chopping(short[] sample,
                               int[] cut)
cut the sample into smaller part
calls: none
called by: absCut

Parameters:
sample - the sample that's going to be chopped
cut - the location that were returned from zeroCrossing or avgEnergy
Returns:
the cut sample

avgEnergy

public static int[] avgEnergy(short[] sample)
5ms frame (80 samples / frame)
determent the noise location base on the energy
calls: none
called by: absCut

Parameters:
sample - the sample which is being analyze
Returns:
squared mean energy

zeroCrossingBoolean

public static boolean[] zeroCrossingBoolean(short[] sample)
Simply mark off the location of Zero-Crossing
calls: none
called by: absCut

Parameters:
sample - speech signal
Returns:
a boolean array with the same size as the sample, true = a zero-crossing, false = no zero-crossing

zeroCrossing

public static int[] zeroCrossing(short[] sample,
                                 int[] energy,
                                 boolean[] crossing)
search for the end points based on zero-crossing and result from avgEnergy
calls: none
called by: absCut

Parameters:
sample - speech signal
energy - result from avgEnergy, which is used as the starting point
crossing - result from zeroCrossingBoolean
Returns:
start and end of voiced speech signal