概要 | パッケージ | クラス | 階層ツリー | 非推奨 API | 索引 | ヘルプ
前のクラス 次のクラス | フレームあり フレームなし
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド

## jAudioFeatureExtractor.jAudioTools
クラス FeatureProcessor

    java.lang.Object
      jAudioFeatureExtractor.jAudioTools.FeatureProcessor

直系の既知のサブクラス:
  jAudioFeatureExtractor

    public class FeatureProcessor

extends java.lang.Object

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.

作成者:
  Cory McKay

フィールドの概要
`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`

フィールドの詳細

### feature_extractors

    protected FeatureExtractor[] feature_extractors

コンストラクタの詳細

### FeatureProcessor

    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

  Validates and stores the configuration to use for extracting features from audio recordings. Prepares the feature_vector_file and feature_key_file XML files for saving.

  パラメータ:
    `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 extraction
    `normalise` - 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.

### FeatureProcessor

    protected FeatureProcessor(int window_size,
                               double sampling_rate,
                               FeatureExtractor[] all_feature_extractors,
                               boolean[] features_to_save_among_all)

メソッドの詳細

### extractFeatures

    public void extractFeatures(java.io.File recording_file,
                                Updater updater)
                         throws java.lang.Exception

  Extract the features from the provided audio file. This includes pre-processing involving sample rate conversion, windowing and, possibly, normalisation. The feature values are automatically saved to the feature_vector_file XML file referred to by the values_writer field. The definitions of the features that are saved are also saved to the feature_key_file XML file referred to by the definitions_writer field.

  パラメータ:
    `recording_file` - The audio file to extract features from.
  例外:
    `java.lang.Exception`

### finalize

    public void finalize()
                  throws java.lang.Exception

  Write the ending tags to the feature_vector_file XML file. Close the DataOutputStreams that were used to write it.

  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.

### getFeatures

    protected double[][][] getFeatures(double[] samples,
                                       int[] window_start_indices)
                                throws java.lang.Exception

  Breaks the given samples into the appropriate windows and extracts features from each window.

  パラメータ:
    `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.
  戻り値:
    The extracted feature values for this recording. The first indice identifies the window, the second identifies the feature and the third identifies the feature value. The third dimension will be null if the given feature could not be extracted for the given window.
  例外:
    `java.lang.Exception` - Throws an exception if a problem occurs.

概要 | パッケージ | クラス | 階層ツリー | 非推奨 API | 索引 | ヘルプ
前のクラス 次のクラス | フレームあり フレームなし
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド