## 4 The Audio-Based Emotion Detection Component: GEVA
### Voice Features Extraction  
There are several open sound feature extraction systems. In this work, we have experimented with \"OpenSMILE\" [53] and with another version that includes the emotion classifier, \"OpenEAR\" [54]. Another voice features extraction system is \"Praat\" [55], but in our opinion, it is not easy to use for an online extraction. It is more suitable for working with prerecorded sounds in a graphical environment. Verbio Speech Analytics [56] also gives solutions for analyzing the audio and detecting certain emotions (anger, joy and neutral). In this work, for the voice features extraction, we have decided to use the language, Chuck [57]. This language is intended to be used for analyzing sound waves and for generating non-verbal sounds. It has been selected for its capacity for working online and for its simplicity and elegance in relation to the programming, using its own audio analyzers. Currently, Chuck is being used by millions of people through apps for Android and Apple iOS, under the company SMULE. Its versatility and power for synthesis and analysis can be tested using the tool, Wekinator [58]. A complete and independent module in charge of the feature extraction has been developed. This module is quite important for the RDS, since there are other systems that need its output to do their own tasks: user localization and identification, voice activity identification, arousal level detection, _etc._  
This voice features extraction module is being continuously executed, while the user voice is being perceived. The extracted features, called statistics, are obtained in the time domain or in the frequency domain using the Fast Fourier Transform (FFT); or in the time-frequency domain using the Discrete Haar Wavelet Transform (DWT) [59] (see Figure 4). These statistics are the following:  
* Pitch
* Flux
* RollOff
* Centroid* Zero-crossing rate (ZCR)
* Root Mean Square (RMS) (Volume)
* Signal-to-noise ratio (SNR)
* Communicative rhythm. Once a user stops talking, the module takes into account the maximum, minimum and average values of the statistics described. Hence, we have the final set of statistics: _pitch FFT average_, _pitch FFT min_, _pitchFFT max_, _pitch FFT amplitude_, _pitch autocorrelation average_, _pitch autocorrelation min_, _pitch autocorrelation max_, _pitch autocorrelation amplitude_, _pitch DWT average_, _pitch DWT min_, _pitch DWT max_, _pitch DWT amplitude_, _centroid average_, _centroid min_, _centroid max_, _centroid amplitude_, _rollOff average_, _rollOff min_,_rollOff max_, _rollOff amplitude_, _gain medium_, _flux medium_, _flux min_, _flux max_, _flux amplitude_, _volume max_, _volume mean_, _SNR average_, _SNR max_, _ZCR average_, _ZCR min_, _ZCR max_, _ZCR amplitude_ and _communicative rhythm_. 1. **Pitch**: This statistic refers to the frequency of the sound perceived by the human ear. It depends on the number of vibrations produced by the vocal chords. The pitch calculation is not included among the components of Chuck, so it has been implemented by the authors. In this work, we have developed three different Pitch Detection Algorithms (PDA) working in distinct domains: 1. The first method detects the first minimum in the autocorrelation of the input signal in the time domain. That is, the pitch corresponds to the minimum in the cross-relation of the audio signal with itself [60, 61]. 2. The second method applies the FFT, so it works in the frequency domain. This algorithm considers the distance among peaks in the spectrum of the signal to calculate the pitch. 3. The last method to obtain the pitch works in the time-frequency domain, and it uses the Discrete Haar-Wavelet Transform (DWT). It is based on [PERSON]'s work [62]. 2. **Flux** indicates if there are big variations in the frequency domain. Values near zero indicate that the obtained amplitude values, in all frequency ranges, are very similar. Values near one indicate that there are important variations in the frequency domain, showing a very sharp spectrum.