# Robustness and Sensitivity Tuning of the Kalman Filter for Speech Enhancement
## 3 Proposed Speech Enhancement Algorithm
### Proposed \(\hat{v}(n,k)\) Estimation Method  
The proposed noise estimation is performed in the acoustic domain using the SPP method [26]. For more details about the SPP method, we refer the readers to [26]. However, we briefly review the SPP-based noise estimation in this section. For this purpose, the noisy speech, \(y(n)\) (Equation (1)) is analyzed frame-wise using the short-time Fourier transform (STFT):  
\[Y_{k}(m)\ =\ S_{k}(m)+V_{k}(m), \tag{36}\]  
where \(Y_{k}(m)\), \(S_{k}(m)\), and \(V_{k}(m)\) denote the complex-valued STFT coefficients of the noisy speech, the clean speech, and the noise signal, respectively, for time-frame index \(k\) and frequency bin index \(m\epsilon\{0,1,\ldots,255\}\). A Hamming window with \(50\%\) overlap was used in STFT analysis ([25], Section 7.2.1). In polar form, \(Y_{k}(m)\), \(S_{k}(m)\), and \(V_{k}(m)\) can be expressed as: \(Y_{k}(m)\ =\ R_{k}(m)e^{i\hat{p}_{k}(m)}\), \(S_{k}(m)\ =\ A_{k}(m)e^{i\hat{p}_{k}(m)}\), and \(V_{k}(m)\ =\ D_{k}(m)e^{i\hat{p}_{k}(m)}\), where \(R_{k}(m)\), \(A_{k}(m)\), and \(D_{k}(m)\) are  
Figure 3: Block diagram of the proposed KF-based SEA. the magnitude spectra of the noisy speech, the clean speech, and the noise signal, respectively, and \(\phi_{k}(m)\), \(\phi_{k}(m)\), and \(\theta_{k}(m)\) are the corresponding phase spectra. We processed each frequency bin of the single-sided noisy speech power spectrum, \(R_{k}^{2}(m)\), to estimate the noise power spectrum, \(\hat{D}_{k}^{2}(m)\), where \(me\{0,1,\ldots,128\}\) contain the DC and Nyquist frequency components. To initialize the algorithm, we considered the first frame (\(k=0\)) of \(R_{0}^{2}(m)\) as silent, giving an estimate of noise power, \(\hat{D}_{0}^{2}(m)=R_{0}^{2}(m)\). The noise PSD, \(\hat{\lambda}_{0}(m)\), was also initialized as \(\hat{\lambda}_{0}(m)=\hat{D}_{0}^{2}(m)\). For \(k\geq 1\); using the speech presence uncertainty principle [26], an MMSE estimate of \(\hat{D}_{k}^{2}(m)\) at \(m^{th}\) frequency bin is given by:  
\[\hat{D}_{k}^{2}(m)=P(H_{0}^{m}|R_{k}(m))R_{k}^{2}(m)+P(H_{1}^{m}|R_{k}(m)) \hat{\lambda}_{k-1}(m), \tag{37}\]  
where \(P(H_{0}^{m}|R_{k}(m))\) and \(P(H_{1}^{m}|R_{k}(m))\) are the conditional probability of the speech absence and the speech presence given \(R_{k}(m)\) at \(m^{th}\) frequency bin. The simplified \(P(H_{1}^{m}|R_{k}(m))\) estimate is given by (The simplification is a result of assuming the a priori probability of the speech absence and presence, \(P(H_{0})\) and \(P(H_{1})\) as: \(P(H_{0})=P(H_{1})\)[26]. ):  
\[P(H_{1}^{m}|R_{k}(m))=\left[1+(1+\xi_{opt})\exp\left\{\left(-\frac{R_{k}^{2}(m )}{\hat{\lambda}_{k-1}(m)}\right)\left(\frac{\xi_{opt}}{1+\xi_{opt}}\right) \right\}\right]^{-1}, \tag{38}\]  
where \(\xi_{opt}\) is the optimal a priori SNR. In [26], the optimal choice for \(\xi_{opt}\) is found to be \(10\log_{10}(\xi_{opt})=15\) dB, and \(P(H_{0}^{m}|R_{k}(m))\) is given by \(P(H_{0}^{m}|R_{k}(m))=1-P(H_{1}^{m}|R_{k}(m))\). If \(P(H_{1}^{m}|R_{k}(m))=1\) occurs at \(m^{th}\) frequency bin, it causes stagnation, which stops updating \(\hat{D}_{k}^{2}(m)\) (Equation (37)). Unlike monitoring the status of \(P(H_{1}^{m}|R_{k}(m))=1\) for a long time as reported in [26], we simply resolve this issue by setting \(P(H_{1}^{m}|R_{k}(m))=0.99\) once this condition occurs prior to updating \(\hat{D}_{k}^{2}(m)\). It was observed that \(R_{k}^{2}(m)\) was completely filled with additive noise during silent activity, thus giving an estimate of noise power. Therefore, unlike updating \(\hat{D}_{k}^{2}(m)\) using Equation (36) by an existing method [26], we achieved this differently depending on the silent/speech activity of \(R_{k}^{2}(m)\) (for each frequency bin \(m\)). Specifically, at \(m^{th}\) frequency bin (\(k\geq 1\)), if \(P(H_{1}^{m}|R_{k}(m))<0.5\), \(R_{k}^{2}(m)\) yields silent activity, resulting in \(\hat{D}_{k}^{2}(m)=R_{k}^{2}(m)\); otherwise, \(\hat{D}_{k}^{2}(m)\) is estimated using Equation (37).