edu.cmu.sphinx.frontend.util
Class EnergyPlotter
java.lang.Object
edu.cmu.sphinx.frontend.util.EnergyPlotter
- All Implemented Interfaces:
- Configurable
public class EnergyPlotter
- extends java.lang.Object
- implements Configurable
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. |
Method Summary |
void |
newProperties(PropertySheet ps)
This method is called when this configurable component needs to be reconfigured. |
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 |
PROP_MAX_ENERGY
@S4Integer(defaultValue=20)
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
EnergyPlotter
public EnergyPlotter()
newProperties
public void newProperties(PropertySheet ps)
throws PropertyException
- Description copied from interface:
Configurable
- This method is called when this configurable component needs to be reconfigured.
- Specified by:
newProperties
in interface Configurable
- Parameters:
ps
- a property sheet holding the new data
- Throws:
PropertyException
- if there is a problem with the properties.
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