public class HnmDatagram extends Datagram
Modifier and Type | Field and Description |
---|---|
HntmSpeechFrame |
frame |
data, duration, NUM_HEADER_BYTES
Constructor and Description |
---|
HnmDatagram(ByteBuffer bb,
int noiseModel)
Constructor which pops a datagram from a byte buffer.
|
HnmDatagram(long setDuration,
HntmSpeechFrame frame)
Construct a HNM datagram.
|
HnmDatagram(RandomAccessFile raf,
int noiseModel)
Constructor which pops a datagram from a random access file.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Datagram other)
Tests if this datagram is equal to another datagram.
|
HntmSpeechFrame |
getFrame()
Get the sinusoidal speech frame
|
int |
getLength()
Get the length, in bytes, of the datagram's data field.
|
void |
write(DataOutput out)
Write this datagram to a random access file or data output stream.
|
equals, getData, getDuration, setDuration
public HntmSpeechFrame frame
public HnmDatagram(long setDuration, HntmSpeechFrame frame)
setDuration
- the duration, in samples, of the data represented by this datagramframe
- the parameters of HNM for a speech frame.public HnmDatagram(RandomAccessFile raf, int noiseModel) throws IOException, EOFException
raf
- the random access file to pop the datagram from.noiseModel
- the noise modelIOException
- IOExceptionEOFException
- EOFExceptionpublic HnmDatagram(ByteBuffer bb, int noiseModel) throws IOException, EOFException
bb
- the byte buffer to pop the datagram from.noiseModel
- noiseModelIOException
- IOExceptionEOFException
- EOFExceptionpublic int getLength()
public HntmSpeechFrame getFrame()
public void write(DataOutput out) throws IOException
write
in class Datagram
out
- outIOException
- IOExceptionpublic boolean equals(Datagram other)
other
- otherCopyright © 2000–2016 DFKI GmbH. All rights reserved.