edu.washington.cs.sounddetector.server.api.object
Class LabeledSound
java.lang.Object
edu.washington.cs.sounddetector.server.api.object.LabeledSound
public class LabeledSound
- extends Object
A LabeledSound holds a recorded sound and a label for that sound.
The sound is assumed to be linear PCM encoded and any other properties (such as sample rate) will
be specified by an appropriate SoundFormat.
- Author:
- the.dylan.price@gmail.com
LabeledSound
public LabeledSound()
LabeledSound
public LabeledSound(String soundClass,
byte[] sound)
- Construct a new LabeledSound.
- Parameters:
soundClass
- the class label for this sound used in training a classifier. Use the label
APIConsts.UNKNOWN_SOUND_CLASS
for negative examples.sound
- a linear PCM encoded sound (any other parameters such as sample rate will be
specified by an appropriate SoundFormat)
setSoundClass
public void setSoundClass(String soundClass)
- Parameters:
soundClass
- the soundClass to set
setSound
public void setSound(byte[] sound)
- Parameters:
sound
- the sound to set
getSoundClass
public String getSoundClass()
- Returns:
- the soundClass
getSound
public byte[] getSound()
- Returns:
- this LabeledSound's sound
toString
public String toString()
- Overrides:
toString
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
equals
public boolean equals(Object obj)
- Overrides:
equals
in class Object
Copyright © 2012. All Rights Reserved.