## 3 Proposed Methods
### Time Domain Phase Correction  
This section gives the phase correction method based on WSOLA and DNN to predict amplitude information for realizing the PLC. The WSOLA method [13] is performed in the time domain by the following three steps. First, a segmental speech signal that is the most similar to the previous segment in a given search interval is determined. Second, this determined segment of speech signal is superimposed on the previous segment by sliding some distance. The first step and the second step are repeated until the length of the output signal of the second step reaches the given length. Last, the output signal is scaled in the time domain. Suppose the output signal of WSOLA is denoted by \(z(t)\) with the length of \(L_{z}\). The segmental number of the input signal is determined by the segmental length \(L\). In this paper, the segmental length \(L\) is set to 20 ms and the sliding distance \(\Delta_{z}\) during superposition is \(0.5L\). To prevent the length of the candidate segment from truncating by the length of the input signal, the distance between the starting sample of the last candidate segment and the end sample of the input signal should be equal to or larger than \(L\). Thus, the segmental number \(M\) should meet the following condition:  
\[L_{z}\leq\frac{L}{2}(M+1) \tag{10}\]  
Taking the equal sign in (10), \(M\) is obtained as follows:  
\[M=(\frac{2L_{z}}{L})-1. \tag{11}\]  
Once \(M\) is determined, the input signal can be segmented. Two methods can be used to determine the first candidate segment. One is to use the beginning point of the input signal as the beginning point and choose \(L\) samples to constitute the first segment \(\text{S}_{1}\). This method has low complexity, but it easily causes a discontinuous problem between the speech segment with PLC and the speech segment without packet loss. The other method is to introduce an auxiliary segment \(\text{S}_{0}\) before the first segment \(\text{S}_{1}\). \(\text{S}_{0}\) also needs to be determined according to the maximum similarity criterion, that is, \(\text{S}_{0}\) is a candidate speech segment with the greatest similarity to the input speech signal in its corresponding search interval. The beginning position \(r_{0}\) of the search interval of \(\text{S}_{0}\) can be determined as follows:  
\[r_{0}=L_{s}-80(\frac{L_{z}}{L_{x}}) \tag{12}\]  
Figure 4: Amplitude spectrum prediction by DNN. This \(r_{0}\) is used to search for the signal segment in the interval from \(-\Delta_{\max}\) to \(\Delta_{\max}\), where \(\Delta_{\max}\) is the search radius, \(L_{s}=2\Delta_{\max}\) is the length of the search interval, 80 is an empirical value, and \(L_{x}\) is the length of the input signal. After \(S_{0}\) is determined, each candidate search segment can be determined according to the maximum similarity criterion. The maximum similarity is represented by the maximum cross-correlation coefficient between the candidate segment in the search interval and the previous segment. Assuming that the previous segment is denoted as \(S_{m-1}\), as shown in Figure 5, \(\Delta x\) is the distance from the beginning position of \(S_{m-1}\) to the midpoint of the current search interval. The search interval \(L_{s}\) depends on the search radius \(\Delta_{max}\) which is set to 5 ms in this paper. Given the time scale factor \(\alpha\), \(\Delta x\) can be given by  
\[\Delta x=\frac{\Delta z}{\alpha} \tag{13}\]  
where \(\alpha\) varies from 1.3 to 2 [13]. In Figure 5, \(S_{m,i}\) is the \(i\)th segment to be selected in the search interval, \(i=1,\,\ldots,\,L_{s}\). In order to find the most similar segment, the normalized correlation coefficient between the candidate segment \(S_{m,i}\) and the previous segment \(S_{m-1}\) can be expressed as  
\[C(i)=\frac{\sum\limits_{t=0}^{\Delta z}S_{m-1}(t+\Delta z)\cdot S_{m,i}(t)}{ \sqrt{\sum\limits_{t=0}^{\Delta z}S_{m,i}^{2}(t)}}, \tag{14}\]  
where \(t\) is time index.