public class RmsNormalizer extends Object
To determine the amplification factor, the signal is divided into segments and for each segment the RMS value is computed. The maximum RMS value is used to adjust the aplitude of the signal. For speech audio, a segment size of 100 ms might be reasonable.
Constructor and Description |
---|
RmsNormalizer() |
Modifier and Type | Method and Description |
---|---|
static void |
normalize(float[][] signals,
float targetRms,
int segmentSize)
Adjusts the amplitude level of a signal to match a specified target RMS amplitude value.
|
public static void normalize(float[][] signals, float targetRms, int segmentSize)
signals
- The multi-channel signal values.targetRms
- Target RMS amplitude.segmentSize
- Number of signal samples to be used per RMS measurement.