|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectframed.CMS1
public class CMS1
Simple straight-forward (offline) cepstral mean subtraction. Compute the mean large amount of speech data to get a reliable value. A good strategy is also to compute the mean on an utterance or speaker basis.
Constructor Summary | |
---|---|
CMS1(FrameSource source,
double[] mean)
Generate a cepstral mean subtraction object using the given source and mean vector; no dynamic update |
Method Summary | |
---|---|
static long |
computeMeanFromSource(FrameSource source,
double[] mean)
Compute the mean vector from the given frame source. |
int |
getFrameSize()
Return the length of the frames (needed for the read call) |
static CMS1 |
loadMeanFromFile(java.lang.String fileName,
FrameSource source)
Load a mean vector from the specified file. |
boolean |
read(double[] buf)
Read the next frame, subtract the mean if speech |
void |
saveMeanToFile(java.lang.String fileName)
Save the current mean vector to the specified file. |
java.lang.String |
toString()
Return a String representation of the object |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CMS1(FrameSource source, double[] mean)
source
- Source to read frommean
- Mean value @see loadMeanFromFileMethod Detail |
---|
public static long computeMeanFromSource(FrameSource source, double[] mean) throws java.io.IOException
source
- FrameSource to read from
java.io.IOException
public int getFrameSize()
FrameSource
getFrameSize
in interface FrameSource
public static CMS1 loadMeanFromFile(java.lang.String fileName, FrameSource source) throws java.io.IOException
fileName
- source
- connector for the newly created CMS
java.io.IOException
public boolean read(double[] buf) throws java.io.IOException
read
in interface FrameSource
buf
- buffer to save the frame; implementing objects may depend
on a constant dimensionduring subsequent calls
java.io.IOException
public void saveMeanToFile(java.lang.String fileName) throws java.io.IOException
fileName
-
java.io.IOException
public java.lang.String toString()
toString
in interface FrameSource
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |