# Replay Speech Detection Based on Dual-Input Hierarchical Fusion Network
## 3 Research Process
### Feature Extraction  
To verify the effectiveness of the proposed model, three acoustic features were used for experimental evaluation in this paper, including a log power magnitude spectrogram (Spec), Linear Frequency Cepstral Coefficients (LFCC), and Constant Q Transform (CQT). The log power magnitude spectrogram, calculated using short-time Fourier transform (STFT) [35], is a 3D graph that represents time, frequency, and signal strength. The speech signal is divided into several short-time windows of equal duration, and the frequency components of each window are computed. Spec is obtained by taking the logarithm and square of the STFT output, resulting in a more intuitive form of spectral analysis. This feature better simulates the nonlinear characteristics of human auditory perception, which is nonlinear in terms of sound intensity and frequency perception. Furthermore, the logarithmic and squared output can amplify low-frequency signals and compress high-frequency signals, leading to enhanced visualization of low-frequency signals. In various fields, such as speech recognition, Spec is widely utilized as an input feature to extract spectral information from speech signals, facilitating the recognition of speech content by machine learning and deep learning algorithms. Linear Frequency Cepstral Coefficients are a powerful method used to identify and classify amplitude characteristics in different speech signals [36]. This method is an improvement over traditional Mel Frequency Cepstral Coefficients (MFCC), as the filters in LFCC are uniformly distributed across the frequency range, allowing for the comprehensive capture of speech signal information. On the other hand, the filter bank in MFCC is only designed based on the human ear's sensitivity to sounds with different frequencies, resulting in a lower resolution in the high-frequency region. In the calculation process of LFCC, the output of each filter is logarithmically transformed into a power spectrum \begin{table}
\begin{tabular}{c c c} \hline \hline \multirow{2}{*}{**Dataset**} & **Bona Fide** & **Spoofed** \\ \cline{2-3}  & **Utterance** & **Utterance** \\ \hline Train & 5400 & 48,600 \\ Dev & 5400 & 24,300 \\ Evaluation & 94,068 & 627,264 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: The distribution of ASVspoof dataset. and further converted into cepstral coefficients using discrete cosine transform. Due to the high correlation between these coefficients, only the first few are required to represent speech signal features. The cepstral coefficients obtained by employing this method are called static LFCC coefficients. Moreover, dynamic LFCC coefficients can be obtained by computing first- and second-order differences in the cepstral coefficients, providing more information about instantaneous changes in the speech signal. Therefore, LFCC is an effective method for feature extraction in speech signals and has a significant advantage in processing high-frequency information in synthetic speech; moreover, the combined use of static and dynamic LFCC coefficients is common in representing speech signal features. Constant Q Transform is a classic time-frequency transform used to analyze the spectral characteristics of a signal [37]. It differs from traditional time-frequency analysis methods, such as Fourier transform, in that it filters the time-domain speech signal with a set of constant Q filters. This is because the filter satisfies the constant Q constraint, i.e., the center frequency-to-bandwidth ratio is the same and the bandwidth magnitude is different at low and high frequencies, resulting in a non-linear frequency domain signal. CQT avoids the disadvantage of uniform time-frequency resolution; low-frequency waves have a narrower bandwidth, and therefore, higher frequency resolution to decompose similar notes, and high-frequency waves have a broader bandwidth, and therefore, higher temporal resolution to track rapidly changing overtones.