## 3 Materials and Methods
### Feature Extraction  
The process of extracting a set of features from a speech signal is an important step in speech-based recognition tasks. There are several methods available for extracting speech features. MFCC, chroma, Mel Spectrogram, Contrast, and Tonnetz are among the commonly used features and are used for gender recognition in this study.  
**Mel Spectrogram**: A spectrogram is a way to visually represent the time and frequency information of a sound signal and is obtained using Short-Time Fourier Transform. A Mel Spectrogram is a type of spectrogram that converts the linear frequencies into the Mel scale, which roughly represents how the human ear perceives frequencies. This scale is given by the following equation [26].  
\[m=2595*\log_{10}\left(1+\frac{f}{700}\right) \tag{1}\]  
where \(f\) represents the physical frequency in Hz and \(m\) represents the perceived frequency in the Mel scale. Mel Spectrograms are commonly utilized in various applications, particularly in speech recognition, speech synthesis, and voice classification. Figure 1 illustrates the Mel Spectrogram features extracted from both female and male speech.  
Figure 1: Mel Spectrogram features extracted from a female (**left**) and a male speech (**right**).  
Mel Frequency Cepstral Coefficients (MFCCs): MFCCs provide a non-linear representation of the short-term power spectrum of an audio signal. They are widely used in various audio signal processing and speech recognition tasks. To calculate MFCC, the Mel Spectrogram of the signal is created and then the Discrete Cosine Transform is applied to the logarithmic Mel Spectrogram of the signal. The resulting list of numbers or coefficients from this process is called the Mel Frequency Cepstrum Coefficients. MFCC features extracted from both female and male speech are shown in Figure 2.  
**Chroma**: Chroma is widely used in various fields such as music classification, genre recognition, and automatic music transcription. It captures the harmonic content of a piece of music and provides a robust representation. In this representation, the entire spectrum is projected into twelve regions representing different semitones of the musical octave [27]. Chroma features extracted from a female and a male speech are shown in Figure 3.  
**Spectral Contrast**: The spectral contrast feature considers the spectral peak, spectral valley, and their difference in each subband to estimate the distribution of harmonic and non-harmonic components in the audio signal. Figure 4 shows the contrast features extracted from female and male speech.  
Figure 4: Contrast features extracted from a female voice (**left**) and a male voice (**right**).  
Figure 3: Chroma features extracted from a female voice (**left**) and a male voice (**right**).  
**Tonnetz:** The Tonnetz features, similar to the Chromogram, offer a way to represent the harmony and pitch classes of a sound. These features are determined by measuring the tonal centroids of a sound in a six-dimensional pitch space known as the Tonal Centroid Space. In several studies, it has been experimentally demonstrated that this method effectively identifies harmonic changes in sound recordings. The Tonnetz features extracted from a female and a male speech are illustrated in Figure 5.