# De-Noising Process in Room Impulse Response with Generalized Spectral Subtraction
## 3 Implementation and Experiment
### Noise Subtraction Procedure for RIR  
The main aim in applying the spectral subtraction method in de-noising noisy RIRs can be stated as an optimization problem. The noise is minimized while maintaining the quality of the reverberation decay. In the GBSS, both spectral over-subtraction and \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \multirow{2}{*}{**Room Type**} & \multicolumn{3}{c}{**Room Size (m)**} & \multicolumn{2}{c}{**Volume**} & \multirow{2}{*}{**Temperature**} & \multirow{2}{*}{**Reference**} \\ \cline{2-2} \cline{5-6}  & **Length** & & & & & **RT** \\ \hline Anechoic Chamber & 8.4 & 7.2 & 6.0 & 363 & 22.7 & 0.08 \\ Meeting Room & 16.5 & 4.35 & 9.95 & 714 & 23.2 & 0.67 \\ Hall & 16.5 & 11.5 & 9.0 & 1708 & 22.8 & 3.14 \\ Room A & 12.0 & 9.0 & 3.2 & 346 & 20.2 & 1.32 \\ Room B & 8.5 & 7.5 & 3.2 & 204 & 20 & 0.72 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Information of the measured rooms. floor factors were fixed to constant values. Based on these studies [13; 27; 28], the spectral floor parameter \(\beta\) was in the range between 0.1 to 0.001 and depended on the average posterior SNR and the over-subtraction factor \(\alpha\) with a desired \(\alpha_{0}\) in the range of 1 to 6 was first implemented in the three rooms to de-noise the RIRs filtered in each octave bands. The goal was to determine the best optimal sets of parameters to reduce the noise levels of the RIRs and extend the reverberation decay range of the EDCs for RTs calculation. Because of the musical noise contributing to the fluctuations of the EDCs, noise subtraction processing should be done carefully. The estimation of the acoustic parameters using spectral subtraction was carried out in MATLAB, and the de-noising process was evaluated as follows. The input RIR was divided into small frames to make it stationary or quasi-stationary over the frames to estimate the segmental SNR for determining the subtraction factors. A Hamming window with a frame size of 256 samples and a 50% overlap was applied to each frame before being enhanced individually. The initial noise spectrum was detected at the tail period of silence to keep the same noise estimation rule with the noise truncation method [20]. The two factors were primarily applied separately in the noise subtracting processing, ranging from 125 to 4000 Hz. This means to change a parameter while the other one is fixed. The de-noising processing was analyzed and evaluated in the following way to ensure the accuracy of the achieved factors. The de-noised results of the three RIRs convoluted with different noise levels and two RIRs measured with ambient noise were compared with the corresponding reference results and the results of the compensation method (that is, subtraction-truncation-correction method) [13]. The ultimate purpose was to achieve the dynamic ranges of the EDCs using various factors of the GBSS method. The dynamic range was determined by the difference in the decay level estimated from a cross-point, A, located at the EDCs of the noisy RIRs, and cross-point B positioned at the de-noised EDCs which are presented in Figure 1. Because the improved dynamic range is affected by the difference in the decay levels between points A and B, it is vital to set optimal thresholds to limit the absolute value of the deviation between the EDCs and the reference EDCs to determine the point. The thresholds ranged from 0.05 dB to 2 dB in most cases; however, an excessively large value may lead to a significant error when the noise levels are high. As a result, the values of 0.1 dB and 0.05 dB were set to calculate the dynamic ranges of the reference EDCs and the de-noised EDCs with different SNRs to ensure the computed errors of the parameters EDT and the RTs were below 1%. The noise subtraction process needs to be done carefully according to the above process. If too much noise is subtracted, it may lead to RIR distortion, causing bias in the EDC in a range. On the other hand, the improved dynamic range may be limited when estimating RTs.