## 2 Materials and Methods
### An Ensemble of Methods for Audio Tampering Detection
#### 2.3.2 Different Encoding Recognition  
This family of techniques investigates the existence of small audio segments in the FUI that have different compression levels or encoding characteristics. This indicates that they may be segments of another file that were inserted in the original file. One common naive approach that can be very effective in some cases is the calculation of the bandwidth, because most compression algorithms apply low-pass filtering to eliminate the higher frequencies that are of minor importance to the human auditory perception.  
Feature vectors are descriptors of several attributes of a signal. Different encoding and compression levels, even if they are often proven to be inaudible in listening tests with human subjects, can affect the features that describe an audio signal. In the Double Compression technique for audio tampering detection that was proposed in [8], the FUI was heavily compressed. Features are extracted from the FUI and the compressed signal. For every time frame, the feature vector difference is calculated between the two signals. Parts of the FUI that have different encoding are expected to have different feature vector distances. Moreover, the gradient of differences is calculated. This measure is expected to reach peak values when there is an alteration in the compression levels, indicating suspicious points.  
The double compression algorithm is summarized as follows [8]:  
1. Heavy compression to the audio file under investigation (FUI), thus creating a double-compressed file (DCF).
2. A feature vector is extracted the FUI and the DCF, creating the (T \(\times\) F) matrices Fi (t), where i = 1, 2, T is the number of time frames and F is the length of the feature vector.
3. For every time frame, the Euclidean distance D(t) of the two matrices is calculated
4. D\({}^{\prime}\)(t) = D(t) - D(t - 1) is calculated to show the differentiation between successive time frames.
5. D\({}^{\prime}\)(t) is expected to present local extrema in time frames that include a transition between audio segments of different compression, indicating possible tampering points.  
For the feature selection, an audio feature vector was evaluated in [7]. Using a dedicated dataset creation script, a set of audio files were created, containing audio segments of different compression formats and bitrates. Specifically, segments of mp3-compressed audio in different bitrates were inserted randomly within an uncompressed file containing speech. Subjective evaluation experiments with three experts in the field of media production indicated that human listeners failed completely to detect the inserted segments for mp3 bitrates above 96 kbps, while they recognized approximately 10% of the inserted segments for mp3s of 64 kbps [7]. The dataset that was created in [7], along with the script for customized dataset generation, are documented and provided publicity at [[http://m3c.web.auth.gr/research/datasets/audio-tampering-dataset/](http://m3c.web.auth.gr/research/datasets/audio-tampering-dataset/)]([http://m3c.web.auth.gr/research/datasets/audio-tampering-dataset/](http://m3c.web.auth.gr/research/datasets/audio-tampering-dataset/)) (accessed on 26 January 2022).  
The selected feature set includes several frequency domain attributes, namely spectral brightness, with predefined threshold frequencies 500 Hz, 1000 Hz, 1500 Hz, 2000 Hz, 3000 Hz, 4000 Hz, and 8000 Hz, as well as rolloff frequencies, which are the upper boundary frequencies that contain energy ratios of 0.3, 0.5, 0.7, or 0.9 to the total signal energy, and spectral statistics (Spectral Centroid, Spread, Skewness, Kurtosis, Spectral Flatness, 13 Mel Frequency Cepstral Coefficients, Zero Crossing Rate, and RMS energy). The technical details of the aforementioned feature vectors are outside the scope of the current paper, but the methodology and feature evaluation process are presented thoroughly in [7].