SPRAAK
|
Calculate peak and dip envelope of a power spectrum. More...
Functions | |
void | spr_envelope_free (SprSspInfo *info) |
int | spr_envelope_setup (SprSspInfo *info, const char **descript, void *aux_info) |
int | spr_envelope_process (SprSspInfo *info, const void *frame_in, void *frame_out) |
Calculate peak and dip envelope of a power spectrum.
Calculate the peak and dip envelope of a power spectrum with simple peak/dip tracker, and if requested, normalize the spectrum by this envelope.
[envelope] | |
---|---|
% info: | |
Track the peak and/or dip values in a spectrogram. The input is assumed to be in the power doamin. Peak and dip tracking operates in the log-power domain.The module performs the following step (in the given order) and can output several intermediate results (in any order): 1.peak tracking (envelope)
| |
alpha peak <nr> | |
Maximal slope in the peak (log) spectrum (x[i+1]=(1.0-alpha)*x[i]). The default value depends on the sample frequency and the number of fft bins. | |
alpha dip <nr> | |
Maximal slope in the dip (log) spectrum. The default value depends on the sample frequency and the number of fft bins. | |
nfr gain <nr> | |
Look at a window of <nr> frames when calculating the local energy values for the gain compensation. The Default value is derived from <alpha_peak>. | |
ssub [beta](1.0) [alpha](0.0) | |
Use the dip values for spectral subtraction with an overestimation factor <beta> and a lower bound <alpha>: x=max(x*<alpha>,x-<beta>*dip). | |
output [env/norm0/gain/env_gain/norm1/dip/ssub/norm2/ssub_env/norm3](env) | |
Output: env: the envelope (before gain adjustment) norm0: the input signal divided by the envelope gain: the gain factors that should be applied on the envelope so that the local average energy is about the same as in the input signal env_gain: the envelope compensated with the gain factors norm1: the input signal divided by the envelope after the gain compensation (see offs_gain and offs_env_gain) dip: the dip values (single frame immediate noise estimate) ssub: the input signal with the dip values subtracted (spectral subtraction) norm2: the input signal after spectral subtraction divided by the envelope (with gain compensation if gain compensation was requested) ssub_env: the envelope signal (with gain compensation if gain compensation was requested) with the dip values subtracted (spectral subtraction) norm3: the signal after spectral subtraction divided by the envelope after the (optional) gain and dip compensation | |
[do/no] [gain/ssub_env] | |
Do or don't do gain compensation (step 2) and/or (don't) do spectral subtraction on the envelope (step 5). The steps that must be performed (1...5) can be derived from the requested output, except for steps 2 and 3 in some cases. This option turns these two step explicitly on or off. |