# Robustness and Sensitivity Tuning of the Kalman Filter for Speech Enhancement
## 2 Kalman Filter for Speech Enhancement
### Impact of Biased \(K_{0}(n)\) on KF-Based Speech Enhancement in WGN Condition  
We analyze the shortcomings of existing KF-based SEAs [20, 21] in terms of biased interpretation of \(K_{0}(n)\). For this purpose, we conducted an experiment with the utterance sp05 (_\"Wipe the grease off his dirty face\"_) of NOIZEUS corpus ([1], Chapter 12) (sampled at 8 kHz) corrupted with 5 dB WGN noise [24]. In [20, 21], a 20 ms non-overlapped rectangular window was considered for converting \(y(n)\) into frames as:  
\[y(n,k)=s(n,k)+v(n,k), \tag{29}\]  
where \(ke\{0,1,2,\ldots,N-1\}\) is the frame index, \(N\) is the total number of frames in an utterance, and \(M\) is the total number of samples in each frame, i.e., \(ne\{0,1,2,\ldots,M-1\}\). In [20], [PERSON] et al. first analyze \(K_{0}(n)\) in the oracle case, where \((\{a_{i}\},\sigma_{w}^{2})\) (\(p=10\)) and \(\sigma_{v}^{2}\) are computed from each frame of the clean speech and the noise signal, \(s(n,k)\) and \(v(n,k)\). It can be seen that \(K_{0}(n)\) approaches 1 when there is speech presence of the noisy speech, which passes almost clean speech to the output (e.g., 0.16-0.33 s or 0.9-1.06 s in Figure 1d,e). Conversely, \(K_{0}(n)\) remains at approximately 0 during speech absence of the noisy speech, which does not pass any corrupting noise (e.g., 0-0.15 s or 1.8-2.19 s in Figure 1d,e). As a result, the KF-oracle method produces enhanced speech with less residual background noise as well as less speech distortion (Figure 1e). In the non-oracle case, \((\{a_{i}\},\sigma_{w}^{2})\) are computed from noisy speech, resulting in biased \((\{\bar{a}_{i}\},\bar{\sigma}_{w}^{2})\). Then, \(K_{0}(n)\) in (21) using biased \(\bar{\sigma}_{w}^{2}\) is given by:  
\[\tilde{K}_{0}(n)=\frac{\alpha^{2}(n)+\bar{\sigma}_{w}^{2}}{\alpha^{2}(n)+ \bar{\sigma}_{w}^{2}+\sigma_{v}^{2}}. \tag{30}\]  
In [20, 21], [PERSON] et al. assumed that the impact of WGN in \(\{\bar{a}_{i}\}\) is negligible. Thus, \(\bar{\sigma}_{w}^{2}\) could be approximately estimated as: \(\bar{\sigma}_{w}^{2}\approx\sigma_{w}^{2}+\sigma_{v}^{2}\)[20, 21]. Substituting \(\bar{\sigma}_{w}^{2}\approx\sigma_{w}^{2}+\sigma_{v}^{2}\) in Equation (29) and re-arranging yields:  
\[\tilde{K}_{0}(n)=\frac{\alpha^{2}(n)+\sigma_{w}^{2}+\sigma_{v}^{2}}{\alpha^{2 }(n)+\sigma_{w}^{2}+2\sigma_{v}^{2}}. \tag{31}\]  
During speech pauses of \(y(n,k)\), \(s(n,k)=0\) gives \(\alpha^{2}(n)=0\) and \(\sigma_{w}^{2}=0\). According to Equation (30), \(\tilde{K}_{0}(n)\) becomes biased around 0.5 (e.g., 0-0.15 s or 1.8-2.19 s in Figure 1d). As a result, \(\tilde{K}_{0}(n)\) leak a significant amount of residual noise in the enhanced speech, as shown in Figure 1f. In the non-oracle case, it is also observed that \(J_{2}(n)\approx 1\) typically during speech pauses of \(y(n,k)\) (e.g., 0-0.15 s or 1.8-2.19 s in Figure 1c). Therefore, the \(J_{2}(n)\) metric is found to be useful in tuning biased \(K_{0}(n)\) as [20]:  
\[K_{0}^{\prime}(n)=\tilde{K}_{0}(n)[1-J_{2}(n)]. \tag{32}\]  
Figure 1d reveals that \(K_{0}^{\prime}(n)\approx 0\) during speech pauses. However, \(K_{0}^{\prime}(n)\) is over-suppressed during speech presence of \(y(n,k)\), resulting in distorted speech, as shown in Figure 1g. To address this, [PERSON] et al. proposed a \(J_{1}(n)\) metric-based tuning of \(\tilde{K}_{0}(n)\)[21]. It can be seen from Figure 1c that \(J_{1}(n)\) lies around 0.5 during speech pauses (e.g., 0-0.15 s or 1.8-2.19 s), whereas it approaches 0 at speech regions (e.g., 0.16-0.33 s or 0.9-1.06 s). Therefore, the tuning of \(\tilde{K}_{0}(n)\) using the \(J_{1}(n)\) metric is performed as [21]:  
\[K_{0}^{\prime\prime}(n)=\tilde{K}_{0}(n)-J_{1}(n). \tag{33}\]  
It can be seen from Figure 1d that \(K_{0}^{\prime\prime}(n)\) is closely similar to the oracle \(K_{0}(n)\), which minimizes distortion in the enhanced speech (Figure 1h) as compared to Figure 1g.