edu.cmu.sphinx.frontend.frequencywarp
Class FrequencyWarper

java.lang.Object
  extended byedu.cmu.sphinx.frontend.frequencywarp.FrequencyWarper

public class FrequencyWarper
extends java.lang.Object

Defines the Bark frequency warping function. This class provides methods to convert frequencies from a linear scale to the bark scale. The bark scale is originated from measurements of the critical bandwidth. Please find more details in books about psychoacoustics or speech analysis/recognition.

Version:
1.0
Author:
rsingh

Constructor Summary
FrequencyWarper()
           
 
Method Summary
 double barkToHertz(double bark)
          Compute linear frequency in Hertz from Bark frequency.
 double hertzToBark(double hertz)
          Compute Bark frequency from linear frequency in Hertz.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FrequencyWarper

public FrequencyWarper()
Method Detail

hertzToBark

public double hertzToBark(double hertz)
Compute Bark frequency from linear frequency in Hertz. The function is: bark = 6.0*log(hertz/600 + sqrt((hertz/600)^2 + 1))

Parameters:
hertz - the input frequency in Hertz
Returns:
the frequency in a Bark scale

barkToHertz

public double barkToHertz(double bark)
Compute linear frequency in Hertz from Bark frequency. The function is: hertz = 300*(exp(bark/6.0) - exp(-bark/6.0))

Parameters:
bark - the input frequency in Barks
Returns:
the frequency in Hertz