Class TemporalFeaturePipelines


  • public final class TemporalFeaturePipelines
    extends Object
    Extracts low level audio features based on time domain values.
    Author:
    Hendrik Schreiber
    • 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 result
        maxFramesToProcess - 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 result
        windowLengthInFrames - 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 result
        windowLengthInFrames - 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 result
        windowLengthInFrames - analysis window length
        maxFramesToProcess - 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 result
        windowLengthInFrames - analysis window length
        rmsThreshold - RMS threshold, the result of createAverageRootMeanSquarePipeline(String, int, int) is suitable as threshold
        maxFramesToProcess - maximum number of frames to process.
        Returns:
        processor pipeline suitable for SignalPump.add(com.tagtraum.jipes.SignalProcessor)
        See Also:
        Floats#rootMeanSquare(float[])