ANNOTATION - The annotation typepublic class AudioClassifier<ANNOTATION> extends AbstractAnnotator<SampleBuffer,ANNOTATION>
AudioClassifier requires an annotator to be passed in, which in
turn requires feature extractor. The feature extractor must be able to
extract a FeatureVector from a SampleBuffer.
The train(List) method takes a list of pairs, where the pairs are
streams mapped to annotations. Each stream represents a set of
SampleBuffers for that annotation. They are extracted into
AnnotatedObjects before being passed into the annotator for feature
extraction.
| Constructor and Description |
|---|
AudioClassifier(BatchAnnotator<SampleBuffer,ANNOTATION> annotator)
Constructor that takes the actual annotator type to use.
|
| Modifier and Type | Method and Description |
|---|---|
List<ScoredAnnotation<ANNOTATION>> |
annotate(SampleBuffer object)
Generate annotations for the given object.
|
Set<ANNOTATION> |
getAnnotations() |
void |
train(List<IndependentPair<AudioStream,ANNOTATION>> streams)
Train the annotator on the given streams.
|
classifypublic AudioClassifier(BatchAnnotator<SampleBuffer,ANNOTATION> annotator)
annotator - The annotatorpublic void train(List<IndependentPair<AudioStream,ANNOTATION>> streams)
streams - The annotated streamspublic Set<ANNOTATION> getAnnotations()
Set of all annotations this Annotator knows
aboutAnnotator.getAnnotations()public List<ScoredAnnotation<ANNOTATION>> annotate(SampleBuffer object)
object - the imageAnnotator.annotate(java.lang.Object)