|
|||||||||
前のクラス 次のクラス | フレームあり フレームなし | ||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
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.
フィールドの概要 | |
---|---|
protected FeatureExtractor[] |
feature_extractors
|
コンストラクタの概要 | |
---|---|
|
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. |
protected |
FeatureProcessor(int window_size,
double sampling_rate,
FeatureExtractor[] all_feature_extractors,
boolean[] features_to_save_among_all)
|
メソッドの概要 | |
---|---|
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. |
protected double[][][] |
getFeatures(double[] samples,
int[] window_start_indices)
Breaks the given samples into the appropriate windows and extracts features from each window. |
クラス java.lang.Object から継承されたメソッド |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
フィールドの詳細 |
---|
protected FeatureExtractor[] feature_extractors
コンストラクタの詳細 |
---|
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.protected FeatureProcessor(int window_size, double sampling_rate, FeatureExtractor[] all_feature_extractors, boolean[] features_to_save_among_all)
メソッドの詳細 |
---|
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.
java.lang.Object
内の finalize
java.lang.Exception
- Throws an exception if cannot write or close the output
streams.protected double[][][] getFeatures(double[] samples, int[] window_start_indices) throws java.lang.Exception
samples
- The samples to extract features from. Sample values should
generally be between -1 and +1.window_start_indices
- The indices of samples that correspond to where each window
should start.
java.lang.Exception
- Throws an exception if a problem occurs.
|
|||||||||
前のクラス 次のクラス | フレームあり フレームなし | ||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |