jAudio Logo

jAudio 1.0 Online Help

Get jAudio at SourceForge.net. Fast, secure and Free Open Source software downloads

Embedding jAudio

  • 1: Pure default feature extraction using Batch.
  • 2:Feature extraction using custom features and aggregators using Batch

Using the Batch class with default settings

  1. Create a Batch
  2. setFeatures(java.io.File[] files)
  3. execute()
Alternatively, use setFetaures(RecordingInfo[] files) to load non-file based samples.

Using the Batch Class with custom settings

  1. setFeatures(HashMap<String,Boolean>, HashMap<String,String[]> toggles) - establishes which features to extract and with what parameters.
  2. applySettings(RecordingInfo[][] recording, int[] windowSize, double[] windowOverlap, double[] samplingRate, boolean[] normalise, boolean[] perWindow, boolean[] overall, java.lang.String[] destinationFK, java.lang.String[] destinationFV, int[] outputType)

    The recording list is to pass the array by reference and should be of length 1. The remainder of the entries are as described in the GUI description.

  3. setAggregators(java.lang.String[] aggNames, java.lang.String[][] aggFeatures, java.lang.String[][] aggParam):

    The aggNames are the names listed in the name descriptor of the AggregatorDefinition. The aggFeatures parameter is an array where every specific aggregator's feature list is listed in the last dimension of the array listing (in order) each feature by name in its FeatureDefinition. Similarly, aggregators requiring parameters set them in the string array located in the same index in the aggParam array.

  4. (Optional:) utilize DataModel.getDataModel() and set the public output streams variables .featureKey and .featureValue to output to a stream rather than a file.

The names of aggregators and features are easiest extracted from the source, but can be obtained from their metadata (FeatureDefinition or AggregatorDefinition) available from each aggregator and feature.

The set of all features is available from the DataModel in the features and aggregatorMap public variables.

To retrieve the results of a computation without using XML or Weka ARFF, use .getDataModel().container.getResults(); which returns a double[][] containing all results.