SPRAAK
|
Normalisation of the SNR of a (mel) spectrum. More...
Functions | |
int | spr_noise_masking_setup (SprSspInfo *Info, const char **descript, void *aux_info) |
int | spr_noise_masking_process (SprSspInfo *Info, const void *frame_in, void *frame_out) |
void | spr_noise_masking_reset (SprSspInfo *Info, SprSspStatus *action) |
void | spr_noise_masking_free (SprSspInfo *Info) |
Normalisation of the SNR of a (mel) spectrum.
This presprocessing module adds noise to each spectral parameter (filterbank output) until the target SNR for that parameter is reached. Some noise is added to the SNR as to avoid a (nearly) hard flooring of the parameter.
Parameter [i] is calculated as follows (in energy): spec[i] += mean_energy[i] / exp(M_LN10 * (SNR[i] + SNRvar[i]*(rand()-0.5)) / 10)
SNR[i] and SNRvar[i] are given by the user. The values of the mean_energy of the parameters are calculated over the first input frames of the input file. They are updated for each new input frame, using a weight.
[noise_masking] | |
---|---|
nfr <number> | |
Number of frames used for initial mean_energy calculation. Set it to -1 if all frames should be used. Default 100. Overruled if a file with means is given. | |
file <fname> | |
Starting mean_enery values are given in a file. | |
alpha <number> | |
Weight for mean_energy update, default 0.05. | |
no_reset | |
Do not reset the mean spectrum at the beginning of a new file. | |
spdet_in <copy/move> <buf_name> | |
Input from a silence speech detector: the spectral mean is only update for speech frames. | |
snr <coeff1> ... | |
Define the target SNR for each spectral parameter. If only one coefficient is given, it is used for all parameters. Default 30 dB. | |
snr_var <coeff1> ... | |
Define the variance on the target SNR for each spectral parameter. If only one coefficient is given, it is used for all parameters. Default 3 dB. | |
db_input | |
Input and output in dB, default the parameters are given as energy. Calculations are based on energy values. |