comirva.audio.extraction
Class AudioFeatureExtractionThread
java.lang.Object
java.lang.Thread
comirva.audio.extraction.AudioFeatureExtractionThread
- All Implemented Interfaces:
- Runnable
- Direct Known Subclasses:
- FluctuationPatternExtractionThread, MandelEllisExtractionThread, TimbreDistributionExtractionThread
public abstract class AudioFeatureExtractionThread
- extends Thread
This thread is intended to do a feature extraction batch job. Each file
handed to the constructor will be process the given feature extractor. The
priority of the thread is low, such that it may run in the background. Any
kind of exception during the batch process are reported to the standard
log and ignored.
This class is abstract because it has one template method, which should
create a DataMatrix
object by using the extracted features.
Depending on the feature a specialized feature extraction thread may for
example return a similarity matrix or a matrix containing vectors.
Method Summary |
protected abstract void |
createDataMatrix()
Template method creating the audio feature specific DataMatrix . |
void |
run()
Starts processing the feature extraction batch job. |
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
files
File[] files
featureExtractor
AudioFeatureExtractor featureExtractor
meta
Vector<String> meta
features
List<AudioFeature> features
ws
Workspace ws
statusBar
JLabel statusBar
AudioFeatureExtractionThread
protected AudioFeatureExtractionThread(AudioFeatureExtractor featureExtractor,
File[] files,
Workspace ws,
JLabel statusBar)
- Creates a new audio feature extraction thread.
- Parameters:
featureExtractor
- AudioFeatureExtractor the extractor, defining the
extraction processfiles
- File[] the audio files to processws
- Workspace the workspace object to store the result instatusBar
- JLabel the status bar to show some progress information
run
public void run()
- Starts processing the feature extraction batch job.
- Specified by:
run
in interface Runnable
- Overrides:
run
in class Thread
createDataMatrix
protected abstract void createDataMatrix()
- Template method creating the audio feature specific
DataMatrix
.