|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectjAudioFeatureExtractor.jAudioTools.FeatureProcessor
public class FeatureProcessor
This class is used to pre-process and extract features from audio recordings. An object of this class should be instantiated with parameters indicating the details of how features are to be extracted.
The extractFeatures method should be called whenever recordings are available to be analyzed. This mehtod should be called once for each recording. It will write the extracted feature values to an XML file after each call. This will also save feature definitions to another XML file.
The finalize method should be called when all features have been extracted. this will finish writing the feature values to the XML file.
Features are extracted for each window and, when appropriate, the average and standard deviation of each of these features is extracted for each recording.
Constructor Summary | |
---|---|
FeatureProcessor(int window_size,
double window_overlap,
double sampling_rate,
boolean normalise,
FeatureExtractor[] all_feature_extractors,
boolean[] features_to_save_among_all,
boolean save_features_for_each_window,
boolean save_overall_recording_features,
java.io.OutputStream feature_values_save_path,
java.io.OutputStream feature_definitions_save_path,
int outputType,
Cancel cancel,
AggregatorContainer container)
Validates and stores the configuration to use for extracting features from audio recordings. |
Method Summary | |
---|---|
void |
extractFeatures(java.io.File recording_file,
Updater updater)
Extract the features from the provided audio file. |
void |
finalize()
Write the ending tags to the feature_vector_file XML file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FeatureProcessor(int window_size, double window_overlap, double sampling_rate, boolean normalise, FeatureExtractor[] all_feature_extractors, boolean[] features_to_save_among_all, boolean save_features_for_each_window, boolean save_overall_recording_features, java.io.OutputStream feature_values_save_path, java.io.OutputStream feature_definitions_save_path, int outputType, Cancel cancel, AggregatorContainer container) throws java.lang.Exception
window_size
- The size of the windows that the audio recordings are to be
broken into.window_overlap
- The fraction of overlap between adjacent windows. Must be
between 0.0 and less than 1.0, with a value of 0.0 meaning no
overlap.sampling_rate
- The sampling rate that all recordings are to be converted to
before feature extractionnormalise
- Whether or not to normalise recordings before feature
extraction.all_feature_extractors
- All features that can be extracted.features_to_save_among_all
- Which features are to be saved. Entries correspond to the
all_feature_extractors parameter.save_features_for_each_window
- Whether or not to save features individually for each window.save_overall_recording_features
- Whetehr or not to save the average and standard deviation of
each feature accross all windows.feature_values_save_path
- The path of the feature_vector_file XML file to save feature
values to.feature_definitions_save_path
- The path of the feature_key_file file to save feature
definitions to.
java.lang.Exception
- Throws an informative exception if the input parameters are
invalid.Method Detail |
---|
public void extractFeatures(java.io.File recording_file, Updater updater) throws java.lang.Exception
recording_file
- The audio file to extract features from.
java.lang.Exception
public void finalize() throws java.lang.Exception
This method should be called when all features have been extracted.
finalize
in class java.lang.Object
java.lang.Exception
- Throws an exception if cannot write or close the output
streams.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |