edu.cmu.sphinx.frontend.util
Class EnergyPlotter

java.lang.Object
  extended byedu.cmu.sphinx.frontend.util.EnergyPlotter

public class EnergyPlotter
extends java.lang.Object

Plots positive energy values of a cepstrum to stdout. The energy value is assumed to be the first element of the double array returned by Data.getValues(). For negative energy value, a "-" will be printed out. The plots look like the following, one line per cepstrum. The energy value for that particular cepstrum is printed at the end of the line.


+......7
+......7
Cepstrum: SPEECH_START
+......7
+.......8
+......7
+.......8
+.......8
+........9
+............14
+...........13
+...........13
+...........13
+.............15
+.............15
+..............16
+..............16
+..............16
+.............15
+............14
+............14
+............14
+............14
+.............15
+..............16
+...............17
+...............17
+...............17
+...............17
+...............17
+...............17
+..............16
+.............15
+............14
+............14
+............14
+...........13
+........9
+.......8
+......7
+......7
+......7
Cepstrum: SPEECH_END
+......7


Field Summary
static java.lang.String PROP_MAX_ENERGY
          The maximum level of energy for which a plot string will be preconstructed.
static int PROP_MAX_ENERGY_DEFAULT
          The default value of PROP_MAX_ENERGY.
 
Constructor Summary
EnergyPlotter(SphinxProperties props)
          Constructs an EnergyPlotter.
 
Method Summary
 void plot(Data cepstrum)
          Plots the energy values of the given Data to System.out.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROP_MAX_ENERGY

public static final java.lang.String PROP_MAX_ENERGY
The maximum level of energy for which a plot string will be preconstructed.

See Also:
Constant Field Values

PROP_MAX_ENERGY_DEFAULT

public static final int PROP_MAX_ENERGY_DEFAULT
The default value of PROP_MAX_ENERGY.

See Also:
Constant Field Values
Constructor Detail

EnergyPlotter

public EnergyPlotter(SphinxProperties props)
Constructs an EnergyPlotter.

Parameters:
props - the SphinxProperties for this object.
Method Detail

plot

public void plot(Data cepstrum)
Plots the energy values of the given Data to System.out. If the Data contains a signal, it prints the signal.

Parameters:
cepstrum - the Data to plot