## 2 Materials and Methods
### System Components
#### 2.2.2 Residual Echo Suppression Model  
The DCCRN [18] architecture, which employs a complex convolutional encoder-decoder structure and a complex long short-term memory (LSTM), was adopted for residual echo suppression. The model was initially developed for speech enhancement in the time-frequency (T-F) domain. It estimates a complex ratio mask (CRM) applied to the STFT of the input signal. For residual echo suppression, the model was adapted to have 4 input channels instead of one, and its inputs were all available signals: \(e(n)\), \(a(n)\), \(x(n)\), and \(m(n)\). The estimated CRM was applied to the STFT of the error signal, \(E(f,k)\). Figure 2 depicts the model's architecture.  
The encoder and decoder branches of the model were symmetrical, where the outputs of each encoder block were used as the inputs of the next encoder block and as additional inputs to the decoder block of the same level. These connections between the different encoder and decoder blocks are termed skip connections. Skip connections have two advantages: they provide an alternative path for the gradient during back-propagation, which is beneficial for model convergence, and they allow re-use of features from the encoder in the decoder. Each encoder/decoder block comprised a complex 2-D convolution layer, a complex batch-normalization layer, and a real parametric rectified linear unit (PReLU) activation function [22], as depicted in Figure 3.  
Figure 2: Residual echo suppression model architecture.  
A complex 2-D convolution layer comprised two real 2-D convolution layers, each operating on the real and imaginary parts of its input. The output of a complex 2-D convolution layer, denoted by \(O_{c}\), is formulated as:  
\[O_{c}=\left(X_{r}*W_{r}-X_{i}*W_{i}\right)+j(X_{r}*W_{i}+X_{i}*W_{r})\,, \tag{4}\]  
where \(X_{r}\) and \(X_{i}\) are the real and imaginary parts of the input, respectively, \(W_{r}\) and \(W_{i}\) are the real and imaginary convolution kernels, respectively, and \(*\) is the convolution operation. Like the complex 2-D convolution layer, the complex LSTM layer comprised two real LSTM layers, denoted by \(\text{LSTM}_{r}\) and \(\text{LSTM}_{i}\). The output of the complex LSTM, denoted by \(F_{c}\), is formulated as:  
\[F_{c}=\left(\text{LSTM}_{r}(X_{r})-\text{LSTM}_{i}(X_{i})\right)+j(\text{LSTM }_{i}(X_{r})+\text{LSTM}_{r}(X_{i}))\,. \tag{5}\]  
Further details regarding the original model's architecture and the structure of the different layers can be found in [18].  
Since a clean near-end signal is unavailable when training with real, recorded data, the noisy near-end signal \(d(n)+v(n)\) was the training target. The training objective was the waveform \(\ell_{1}\) loss, combined with the multi-resolution STFT magnitude loss adopted from [17]. For an estimated signal \(\tilde{\mathbf{y}}\) and its ground-truth \(\mathbf{y}\), the loss is defined as:  
\[\text{Loss}=\frac{1}{T}[||\mathbf{y}-\tilde{\mathbf{y}}||_{1}+\sum_{i=1}^{M}L _{\text{mag}}^{(i)}(\mathbf{y},\tilde{\mathbf{y}})] \tag{6}\]  
\[L_{\text{mag}}^{(i)}(\mathbf{y},\tilde{\mathbf{y}})=\frac{1}{T}||\text{log}| \text{STFT}(\mathbf{y})|-\text{log}|\text{STFT}(\tilde{\mathbf{y}})||_{1} \tag{7}\]  
where \(T\) denotes the total time steps number, \(||\cdot||_{1}\) is the \(\ell_{1}\) norm, \(M\) is the number of STFT resolutions, and \(i\) is the resolution index.