|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.cmu.sphinx.util.props.ConfigurableAdapter
edu.cmu.sphinx.frontend.BaseDataProcessor
edu.cmu.sphinx.frontend.util.StreamCepstrumSource
public class StreamCepstrumSource
Produces Mel-cepstrum data from an InputStream. To set the inputstream with cepstral data, use the setInputStream method, and then call getData() to obtain the Data
objects that have cepstra data in it.
| Field Summary | |
|---|---|
static java.lang.String |
PROP_BINARY
The SphinxProperty specifying whether the input is in binary. |
static java.lang.String |
PROP_CEPSTRUM_LENGTH
The sphinx property specifying the length of the cepstrum data. |
static java.lang.String |
PROP_FRAME_SHIFT_MS
The sphinx property name for frame shift in milliseconds, which has a default value of 10F. |
static java.lang.String |
PROP_FRAME_SIZE_MS
The sphinx property name for frame size in milliseconds. |
static java.lang.String |
PROP_SAMPLE_RATE
The sphinx property that defines the sample rate |
| Constructor Summary | |
|---|---|
StreamCepstrumSource()
|
|
StreamCepstrumSource(int cepstrumLength,
boolean binary,
float frameShiftMs,
float frameSizeMs,
int sampleRate)
|
|
| Method Summary | |
|---|---|
Data |
getData()
Returns the next Data object, which is the mel cepstrum of the input frame. |
void |
initialize()
Constructs a StreamCepstrumSource that reads MelCepstrum data from the given path. |
void |
newProperties(PropertySheet ps)
This method is called when this configurable component needs to be reconfigured. |
void |
setInputStream(java.io.InputStream is,
boolean bigEndian)
Sets the InputStream to read cepstral data from. |
| Methods inherited from class edu.cmu.sphinx.frontend.BaseDataProcessor |
|---|
getPredecessor, getTimer, setPredecessor |
| Methods inherited from class edu.cmu.sphinx.util.props.ConfigurableAdapter |
|---|
getName, toString |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
@S4Boolean(defaultValue=true) public static final java.lang.String PROP_BINARY
@S4Double(defaultValue=25.625) public static final java.lang.String PROP_FRAME_SIZE_MS
@S4Double(defaultValue=10.0) public static final java.lang.String PROP_FRAME_SHIFT_MS
@S4Integer(defaultValue=13) public static final java.lang.String PROP_CEPSTRUM_LENGTH
@S4Integer(defaultValue=16000) public static final java.lang.String PROP_SAMPLE_RATE
| Constructor Detail |
|---|
public StreamCepstrumSource(int cepstrumLength,
boolean binary,
float frameShiftMs,
float frameSizeMs,
int sampleRate)
public StreamCepstrumSource()
| Method Detail |
|---|
public void newProperties(PropertySheet ps)
throws PropertyException
Configurable
newProperties in interface ConfigurablenewProperties in class ConfigurableAdapterps - a property sheet holding the new data
PropertyException - if there is a problem with the properties.public void initialize()
initialize in interface DataProcessorinitialize in class BaseDataProcessor
public void setInputStream(java.io.InputStream is,
boolean bigEndian)
throws java.io.IOException
is - the InputStream to read cepstral data frombigEndian - true if the InputStream data is in big-endian, false otherwise
java.io.IOException - if an I/O error occurs
public Data getData()
throws DataProcessingException
getData in interface DataProcessorgetData in class BaseDataProcessorDataProcessingException - if a data processing error occurs
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||