|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.cmu.sphinx.frontend.util.Utterance
Represents the complete audio data of an utterance.
Constructor Summary | |
Utterance(java.lang.String name,
javax.sound.sampled.AudioFormat format)
Constructs a default Utterance object. |
Method Summary | |
void |
add(byte[] audio)
Adds an audio frame into this Utterance. |
byte[] |
getAudio()
Returns the complete audio stream of this utterance. |
javax.sound.sampled.AudioFormat |
getAudioFormat()
Returns the audio format of this Utterance. |
float |
getAudioTime()
Returns the amount of time (in seconds) this Utterance lasts. |
java.lang.String |
getName()
Returns the name of this Utterance. |
void |
save(java.lang.String fileName,
javax.sound.sampled.AudioFileFormat.Type fileFormat)
Save the audio as a WAV file in the given file. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Utterance(java.lang.String name, javax.sound.sampled.AudioFormat format)
name
- the name of this Utterance, e.g., it can be the
name of the audio file where the audio came fromformat
- the audio format of this UtteranceMethod Detail |
public java.lang.String getName()
public javax.sound.sampled.AudioFormat getAudioFormat()
public void add(byte[] audio)
audio
- the audio frame to addpublic byte[] getAudio()
public float getAudioTime()
public void save(java.lang.String fileName, javax.sound.sampled.AudioFileFormat.Type fileFormat) throws java.io.IOException
fileName
- the name of the audio filefileFormat
- the audio file format
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |