Lines Matching defs:noise

35   // used when noise is flatter than speech
122 //for quantile noise estimation
144 inst->priorSpeechProb = (float)0.5; //prior prob for speech/noise
147 inst->noisePrev[i] = (float)0.0; //previous noise-spectrum
149 inst->magnAvgPause[i] = (float)0.0; //conservative noise spectrum estimate
187 inst->modelUpdatePars[2] = 0; //counter for update of conservative noise spectrum
239 // Estimate noise
240 void WebRtcNs_NoiseEstimation(NSinst_t* inst, float* magn, float* noise) {
293 // Sequentially update the noise during startup
295 // Use the last "s" to get noise during startup that differ from zero.
302 noise[i] = inst->quantile[i];
349 // extract parameters for speech/noise probability
373 //very low fluct, so likely noise
503 // most likely just noise state
564 // Compute the difference measure between input spectrum and a template/learned noise spectrum
577 //conservative smooth noise spectrum from pause frames
604 // Compute speech/noise probability
605 // speech/noise probability is returned in: probSpeechFinal
607 //noise is the noise spectrum
722 // main routine for noise reduction
737 float magn[HALF_ANAL_BLOCKL], noise[HALF_ANAL_BLOCKL];
814 // and there is no noise suppression effect. Depending on the duration of the
816 // what is noise and what is speech.
913 // quantile noise estimate
914 WebRtcNs_NoiseEstimation(inst, magn, noise);
915 //compute simplified noise model during startup
917 // Estimate White noise
919 // Estimate Pink noise parameters
932 // Constrain the pink noise power to be in the interval [0, 1];
941 // Calculate frequency independent parts of parametric noise estimate.
943 // Use white noise estimate
946 // Use pink noise estimate
953 // Estimate the background noise using the white and pink noise parameters
955 // Use pink noise estimate
960 // Weight quantile noise with modeled noise
961 noise[i] *= (inst->blockInd);
963 noise[i] += (tmpFloat2 / (float)(inst->blockInd + 1));
964 noise[i] /= END_STARTUP_SHORT;
977 //option: average the quantile noise: for check with AEC2
979 noise[i] = (float)0.6 * inst->noisePrev[i] + (float)0.4 * noise[i];
983 theFilter[i] = (magn[i] - inst->overdrive * noise[i]) / (magn[i] + (float)0.0001);
989 // STEP 1: compute prior and post snr based on quantile noise est
996 if (magn[i] > noise[i]) {
997 snrLocPost[i] = magn[i] / (noise[i] + (float)0.0001) - (float)1.0;
1020 //STEP 2: compute speech/noise likelihood
1023 // compute difference of input spectrum with learned/estimated noise spectrum
1052 // compute speech/noise probability
1054 // time-avg parameter for noise update
1059 // temporary noise update:
1064 // time-constant based on speech/noise state
1067 // increase gamma (i.e., less noise update) for frame likely to be speech
1071 // conservative noise update
1075 // noise update
1077 noise[i] = noiseUpdateTmp;
1079 noise[i] = gammaNoiseTmp * inst->noisePrev[i] + ((float)1.0 - gammaNoiseTmp)
1081 // allow for noise update downwards:
1082 // if noise update decreases the noise, it is safe, so allow it to happen
1083 if (noiseUpdateTmp < noise[i]) {
1084 noise[i] = noiseUpdateTmp;
1088 // done with step 2: noise update
1091 // STEP 3: compute dd update of prior snr and post snr based on new noise estimate
1096 if (magn[i] > noise[i]) {
1097 currentEstimateStsa = magn[i] / (noise[i] + (float)0.0001) - (float)1.0;
1146 // keep track of noise and magn spectrum for next frame
1148 inst->noisePrev[i] = noise[i];
1192 //combine both scales with speech/noise prob: