bbc-vamp-plugins  1.0
Protected Attributes
Energy Class Reference

Calculates the RMS energy and related features. More...

#include <Energy.h>

List of all members.

Protected Attributes

float sampleRate
bool useRoot
float threshRatio
vector< float > rmsEnergy
float prevRMS
float avgWindowLength
float avgPercentile
float dipThresh

Detailed Description

Calculates the RMS energy and related features.

Outputs

RMS energy
The root mean square energy of the signal.
RMS energy delta
The difference between the RMS energy of the current frame and the last.
Moving average
The Xth percentile of the RMS energy within a window.
Dip probability
The ratio of frames that have dipped below the dip threshold within the averaging window, where the threshold is a product of the moving average.
Low energy ratio
Percentage of frames in the file whose energy falls below a threshold, which is a product of the overall mean energy.

Parameters

Use root
Whether to apply the square root in RMS calculation. (default = 1)
Moving average window size
The size of the averaging window, in seconds. (default = 1.0)
Moving average percentile
The percentile used to calculate the average. (default = 3.0)
Dip threshold
The threshold for calculating the dip, which is multiplied by the moving average. (default = 3.0)
Low energy threshold
The threshold for calculating low energy, which is multiplied by the overall mean RMS energy (default = 1.0)

Description

RMS energy for each block is calculated as follows. The square root can be removed using the 'Use root' parameter (default = true)

\[ RMS = \sqrt{\displaystyle\sum\limits_{i=0}^n x_i^2} \]

The dip threshold is a simple but effective speech/music discriminator. It is defined as the ratio of frames in a moving window which fall below a threshold, where the threshold is a product of the moving average.

The low energy ratio is the percentage of blocks which fall below a certain RMS energy threshold. The threshold is set using the 'Low energy threshold' parameter which is a ratio of the overall mean RMS energy (default = 1).


Member Data Documentation

float Energy::avgPercentile [protected]

Percentile to calculate as average.

float Energy::avgWindowLength [protected]

Length of window to use for averaging, in seconds

float Energy::dipThresh [protected]

Threshold to use for calculating dips, as a multiple of the moving average.

float Energy::prevRMS [protected]

Variable to store RMS value of previous block

vector<float> Energy::rmsEnergy [protected]

Variable to store RMS values from previous blocks in order to calculate mean

float Energy::sampleRate [protected]

Variable to store input sample rate, used for calculating window sizes

float Energy::threshRatio [protected]

Ratio of threshold to average energy

bool Energy::useRoot [protected]

Flag to indicate whether to find root of mean energy


The documentation for this class was generated from the following file: