# Exploring the Effectiveness of the Phase Features on Double Compressed AMR Speech Detection
## 4 Magnitude and Phase Spectra of AMR-Encoded Speech Signals  
While speech is inherently a non-stationary signal, it is assumed to be quasi-stationary when analyzed over a short duration (typically 20-40 ms) [38]. Therefore, speech signals are processed through short-term analysis. In this approach, the signal is initially segmented into short, overlapping frames and then the desired speech processing techniques are applied to each of these individual frames. The spectrum of speech signals is obtained using the short-term Fourier transform (STFT), which involves applying the discrete Fourier transform (DFT) to these short speech frames. Concretely, given a set of short speech frames denoted as \(x(n,t)\) where \(n=0,\,1,\,\dots,\,N-1\) and \(t=1,\,2,\,\dots,\,T\) representing the sample and frame indices, respectively, the STFT is computed by:  
\[X(k,t)=\sum_{n=0}^{N-1}x(n,t)w(n)e^{-j2\pi kn/N} \tag{1}\]  
where \(w(n)\) is the data-tapering window (e.g., Hamming or Hanning window) and \(k\) represents the DFT bin. Since \(X(k,t)\) is complex-valued, Equation (1) can be written in the polar form as  
\[X(k,t)=|X(k,t)|e^{\theta(k,t)} \tag{2}\]  
where \(|X(k,t)|\) is the short-term magnitude spectrum (also known as the spectrogram of the signal and visualized by intensity plot on log-scale) and \(\theta(k,t)\) is the short-term phase spectrum of the speech signal. Spectrogram features (\(|X(k,t)|\)) are widely used in the majority of the current state-of-the-art DNN-based speech-related recognition tasks, such as speaker recognition and speech recognition. Hence, usually phase information (\(\theta(k,t)\)) is discarded. Similarly, to the best of our knowledge, the short-term phase spectrum has not been used for DC audio detection tasks previously. However, the importance of phase information in human perception has been reported in several studies [15; 16; 17]. For example, in [16], it was shown that the reconstructed speech signal sounds less natural when phase information is discarded during speech coding. Similarly, in [15], it was reported that human perception of phase varies with frequency especially for low-pitched speakers. In [17], authors showed that the STFT phase spectrum is as important as the STFT magnitude spectrum in speech intelligibility when analysis-synthesis parameters are properly selected. Since phase information was found to have a considerable impact on human speech perception and speech intelligibility, intuitively, it can be considered a reasonable feature representation for DC audio detection. Hence, in this paper, we aim at investigating the effect of the STFT phase spectrum on DC AMR audio detection. In order to analyze the effect of AMR compression on the phase spectrum of a speech signal, the phase spectrum of the selected original (uncompressed) speech signal and its compressed (SC and DC) counterparts are first computed. Suppose that \(\theta_{\text{O}}(k,t)\), \(\theta_{\text{SC}}(k,t)\) and \(\theta_{\text{DC}}(k,t)\) denote the phase spectrum of the original SC and DC speech signals, respectively. Then the average difference phase spectrum between the original speech and SC AMR speech is computed for each DFT bin \(k\) by  
\[\Delta\theta_{\text{O,SC}}(k)=\frac{1}{T}\left[\sum_{t=1}^{T}\theta_{\text{O}}( k,t)-\sum_{t=1}^{T}\theta_{\text{SC}}(k,t)\right] \tag{3}\]  
similarly, the average difference phase spectrum between the SC and DC speech signals is computed by  
\[\Delta\theta_{\text{SC,DC}}(k)=\frac{1}{T}\left[\sum_{t=1}^{T}\theta_{\text{ SC}}(k,t)-\sum_{t=1}^{T}\theta_{\text{DC}}(k,t)\right] \tag{4}\]  
where \(T\) is the total number of speech frames. Equation (3) reveals the impact of the first compression on the phase spectrum compared to the original (uncompressed) signal for each frequency (\(k\)), while Equation (4) delves into the effect of subsequent compression on the phase spectrum relative to the SC speech signal.