bbc-vamp-plugins
1.0
|
Calculates the RMS energy and related features. More...
#include <Energy.h>
Protected Attributes | |
float | sampleRate |
bool | useRoot |
float | threshRatio |
vector< float > | rmsEnergy |
float | prevRMS |
float | avgWindowLength |
float | avgPercentile |
float | dipThresh |
Calculates the RMS energy and related features.
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).
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