Class TemporalFeaturePipelines
- java.lang.Object
-
- com.tagtraum.audiokern.audioprocessor.TemporalFeaturePipelines
-
public final class TemporalFeaturePipelines extends Object
Extracts low level audio features based on time domain values.- Author:
- Hendrik Schreiber
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static SignalPipeline<AudioBuffer,Float>
createAverageRootMeanSquarePipeline(String id, int windowLengthInFrames, int maxFramesToProcess)
Creates a pipeline that converts the signal to mono, applies an analysis window of the given length, computes the energy's root mean square (RMS) for each window and then averages the RMS values.static SignalPipeline<AudioBuffer,Float>
createLowEnergyWindowsFractionPipeline(String id, int windowLengthInFrames, float rmsThreshold, int maxFramesToProcess)
Creates a pipeline that converts the signal to mono, applies an analysis window of the given length, computes the root mean square (RMS) for each window and then calculates the fraction of RMS values below a given threshold value.static SignalPipeline<AudioBuffer,float[]>
createRootMeanSquarePipeline(String id, int windowLengthInFrames, int maxFramesToProcess)
Creates a pipeline that converts the signal to mono, applies an analysis window of the given length, and computes the root mean square (RMS) for each window.static SignalPipeline<AudioBuffer,Float>
createStandardDeviationRootMeanSquarePipeline(String id, int windowLengthInFrames, int maxFramesToProcess)
Creates a pipeline that converts the signal to mono, applies an analysis window of the given length, computes the root mean square (RMS) for each window and then calculates the standard deviation of the RMS values.static SignalPipeline<AudioBuffer,Float>
createTemporalCentroidPipeline(String id, int windowLengthInFrames, int maxFramesToProcess)
Creates a pipeline that converts the signal to mono, applies an analysis window of the given length, and computes the root mean square (RMS) of the energy for each window.static SignalPipeline<AudioBuffer,Float>
createZeroCrossingRatePipeline(String id, int maxFramesToProcess)
Creates a pipeline that converts the signal to mono, computes the zero crossing rate for each 'pumped' buffer and then averages these rates.
-
-
-
Method Detail
-
createZeroCrossingRatePipeline
public static SignalPipeline<AudioBuffer,Float> createZeroCrossingRatePipeline(String id, int maxFramesToProcess)
Creates a pipeline that converts the signal to mono, computes the zero crossing rate for each 'pumped' buffer and then averages these rates. Provides an indication for signal noisiness (high value = more noise). Note that the DC component has to be zero or at least very close to zero for this feature to be meaningful.- Parameters:
id
- id under which to collect the final resultmaxFramesToProcess
- maximum number of frames to process- Returns:
- processor pipeline suitable for
SignalPump.add(com.tagtraum.jipes.SignalProcessor)
- See Also:
Floats#zeroCrossingRate(float[])
-
createAverageRootMeanSquarePipeline
public static SignalPipeline<AudioBuffer,Float> createAverageRootMeanSquarePipeline(String id, int windowLengthInFrames, int maxFramesToProcess)
Creates a pipeline that converts the signal to mono, applies an analysis window of the given length, computes the energy's root mean square (RMS) for each window and then averages the RMS values. The resulting value is an indicator for the average energy per window.- Parameters:
id
- id under which to collect the final resultwindowLengthInFrames
- analysis window length, recommended is a length of ~46.4ms (i.e. 2048 frames for a 44.1kHz signal)maxFramesToProcess
- maximum number of frames to process.- Returns:
- processor pipeline suitable for
SignalPump.add(com.tagtraum.jipes.SignalProcessor)
- See Also:
Floats#rootMeanSquare(float[])
-
createStandardDeviationRootMeanSquarePipeline
public static SignalPipeline<AudioBuffer,Float> createStandardDeviationRootMeanSquarePipeline(String id, int windowLengthInFrames, int maxFramesToProcess)
Creates a pipeline that converts the signal to mono, applies an analysis window of the given length, computes the root mean square (RMS) for each window and then calculates the standard deviation of the RMS values. The resulting value is an indicator for fluctuation the average energy from window to window.- Parameters:
id
- id under which to collect the final resultwindowLengthInFrames
- analysis window length, recommended is a length of ~46.4ms (i.e. 2048 frames for a 44.1kHz signal)maxFramesToProcess
- maximum number of frames to process.- Returns:
- processor pipeline suitable for
SignalPump.add(com.tagtraum.jipes.SignalProcessor)
- See Also:
Floats#rootMeanSquare(float[])
-
createRootMeanSquarePipeline
public static SignalPipeline<AudioBuffer,float[]> createRootMeanSquarePipeline(String id, int windowLengthInFrames, int maxFramesToProcess)
Creates a pipeline that converts the signal to mono, applies an analysis window of the given length, and computes the root mean square (RMS) for each window. The resulting float array can be processed further to compute features like the RMS standard deviation, the average RMS or the fraction of low energy windows (e.g. less than average RMS).- Parameters:
id
- id under which to collect the final resultwindowLengthInFrames
- analysis window lengthmaxFramesToProcess
- maximum number of frames to process.- Returns:
- processor pipeline suitable for
SignalPump.add(com.tagtraum.jipes.SignalProcessor)
- See Also:
Floats#percentageBelowAverage(float[])
-
createLowEnergyWindowsFractionPipeline
public static SignalPipeline<AudioBuffer,Float> createLowEnergyWindowsFractionPipeline(String id, int windowLengthInFrames, float rmsThreshold, int maxFramesToProcess)
Creates a pipeline that converts the signal to mono, applies an analysis window of the given length, computes the root mean square (RMS) for each window and then calculates the fraction of RMS values below a given threshold value. The resulting value is an indicator for the amount of silence or near silence.- Parameters:
id
- id under which to collect the final resultwindowLengthInFrames
- analysis window lengthrmsThreshold
- RMS threshold, the result ofcreateAverageRootMeanSquarePipeline(String, int, int)
is suitable as thresholdmaxFramesToProcess
- maximum number of frames to process.- Returns:
- processor pipeline suitable for
SignalPump.add(com.tagtraum.jipes.SignalProcessor)
- See Also:
Floats#rootMeanSquare(float[])
-
createTemporalCentroidPipeline
public static SignalPipeline<AudioBuffer,Float> createTemporalCentroidPipeline(String id, int windowLengthInFrames, int maxFramesToProcess)
Creates a pipeline that converts the signal to mono, applies an analysis window of the given length, and computes the root mean square (RMS) of the energy for each window. Then the temporal centroid of the RMS energy values is (continuously) computed.- Parameters:
id
- id under which to collect the final resultwindowLengthInFrames
- analysis window lengthmaxFramesToProcess
- maximum number of frames to process.- Returns:
- processor pipeline suitable for
SignalPump.add(com.tagtraum.jipes.SignalProcessor)
- See Also:
- Geoffroy Peeters: "A Large Set of Audio Features for Sound Description", 2004,
MapFunctions.createTemporalCentroidFunction()
-
-