edu.washington.cs.sounddetector.server.api.object
Class LabeledSound

java.lang.Object
  extended by 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

Constructor Summary
LabeledSound()
           
LabeledSound(String soundClass, byte[] sound)
          Construct a new LabeledSound.
 
Method Summary
 boolean equals(Object obj)
           
 byte[] getSound()
           
 String getSoundClass()
           
 int hashCode()
           
 void setSound(byte[] sound)
           
 void setSoundClass(String soundClass)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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)
Method Detail

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.