scieee AI-readable full text Open interactive document viewer

Speech enhancement using deep learning

Badescu, Dan Mihai

Abstract

This thesis explores the possibility to achieve enhancement on noisy speech signals using Deep Neural Networks. Signal enhancement is a classic problem in speech processing. In the last years, researches using deep learning has been used in many speech processing tasks since they have provided very satisfactory results. As a first step, a Signal Analysis Module has been implemented in order to calculate the magnitude and phase of each audio file in the database. The signal is represented into its magnitude and its phase, where the magnitude is modified by the neural network, and then it is reconstructed with the original phase. The implementation of the Neural Networks is divided into two stages.The first stage was the implementation of a Speech Activity Detection Deep Neural Network (SAD-DNN). The magnitude previously calculated, applied to the noisy data, will train the SAD-DNN in order to classify each frame in speech or non-speech. This classification is useful for the network that does the final cleaning. The Speech Activity Detection Deep Neural Network is followed by a Denoising Auto-Encoder (DAE). The magnitude and the label speech or non-speech will be the input of this second Deep Neural Network in charge of denoising the speech signal. The first stage is also optimized to be adequate for the final task in this second stage. In order to do the training, Neural Networks require datasets. In this project the Timit corpus [9] has been used as dataset for the clean voice (target) and the QUT-NOISE TIMIT corpus[4] as noisy dataset (source). Finally, Signal Synthesis Module reconstructs the clean speech signal from the enhanced magnitudes and the phase. In the end, the results provided by the system have been analysed using both objective and subjective measures.

Full text

Speech Enhancement using Deep Learning Degree’s Thesis Audiovisual Systems Engineering Author: Dan Mihai Badescu Advisors: Antonio Bonafonte C´avez Universitat Polit`ecnica de Catalunya (UPC) 2016 - 2017 Abstract This thesis explores the possibility to achieve enhancement on noisy speech signals using Deep Neural Networks. Signal enhancement is a classic problem in speech processing. In the last years, researches using deep learning has been used in many speech processing tasks since they have provided very satisfactory results. As a first step, a Signal Analysis Module has been implemented in order to calculate the magnitude and phase of each audio file in the database. The signal is represented into its magnitude and its phase, where the magnitude is modified by the neural network, and then it is reconstructed with the original phase. The implementation of the Neural Networks is divided into two stages.The first stage was the implementation of a Speech Activity Detection Deep Neural Network (SAD-DNN). The magnitude previously calculated, applied to the noisy data, will train the SAD-DNN in order to classify each frame in speech or non-speech. This classification is useful for the network that does the final cleaning. The Speech Activity Detection Deep Neural Network is followed by a Denoising Auto-Encoder (DAE). The magnitude and the label speech or non-speech will be the input of this second Deep Neural Network in charge of denoising the speech signal. The first stage is also optimized to be adequate for the final task in this second stage. In order to do the training, Neural Networks require datasets. In this project the Timit corpus [9] has been used as dataset for the clean voice (target) and the QUT-NOISE TIMIT corpus[4] as noisy dataset (source). Finally, Signal Synthesis Module reconstructs the clean speech signal from the enhanced magnitudes and the phase. In the end, the results provided by the system have been analysed using both objective and subjective measures. 1 Resum Aquesta tesis explora la possibilitat d’aconseguir millorar senyals de veu amb soroll, utilitzant Xarxes Neuronals Profundes. La millora de senyals ´es un problema cl`assic del processatde senyal, per`o recentment s’est`a investigant amb deep learning, ja que s´on t`ecniques que han donat resultats molt satisfactoris en moltes tasques de processament de veu. Com a primer pas, s’ha implementat un M`odul d’An`alisi de Senyal amb l’objectiu d’extreure el m`odul i la fase de cada arxiu d’`audio de la base de dades. El senyal es representa en m`odul i fase, on el m`odul es modifica amb la xarxa neuronal i posteriorment es reconstrueix amb la fase original. La implementaci´o de les Xarxes Neuronals consta de dues etapes. En la primera etapa es va implementar una Xarxa Neuronal de Detecci´o d’Activitat de Veu. El m`odul pr`eviament calculat, aplicat a les dades amb soroll, s’utilitza com entrada per entrenar aquesta xarxa, de manera que s’aconsegueix classificar cada trama en veu o no veu. Aquesta classificaci´o ´es ´util per la xarxa que fa la neteja final. A continuaci´o de la Xarxa Neuronal de Detecci´o d’Activitat de Veu s’implementa una altra amb l’objectiu d’eliminar el soroll. El m`odul, juntament amb la etiqueta obtinguda en la xarxa anterior, seran l’entrada d’aquesta nova xarxa. En aquesta segona etapa tamb´e s’optimitza la primera per adaptar-se a la tasca final. Les Xarxes Neuronals requereixen bases de dades per fer l’entrenament. En aquest projecte s’ha utilitzat el Timit corpus [9] com a base de dades de veu neta (objectiu) i el QUT-NOISE TIMIT[4] com a base de dades amb soroll (font). A continuaci´o, el M`odul de S´ıntesi de Senyal reconstrueix el senyal de veu net a partir del m`odul netejat i la fase original. Finalment, els resultats obtinguts del sistema van ser analitzats utilitzant mesures objectives i subjectives. 2 Resumen Esta tesis explora la posibilidad de conseguir mejorar se˜nales de voz con ruido utilizando Redes Neuronales Profundas. La mejora de se˜nales es un problema cl´asico del procesado de se˜nal, pero recientemente se esta investigando con deep learning, ya que son t´ecnicas que han dado resultados muy satisfactorios en muchas tareas del procesado de se˜nal. Como primer paso, se ha implementado un M´odulo de An´alisis de Se˜nal con el objetivo de extraer el m´odulo y fase de cada archivo de voz de la base de datos. La se˜nal se representa en m´odulo y fase, donde el m´odulo se modifica con la red neuronal y posteriormente se reconstruye con la fase original. La implementaci´on de la Red Neuronal consta de dos etapas. En la primera etapa se implement´o una Red Neuronal de Detecci´on de Actividad de Voz. El m´odulo previamente calculado, aplicado a los datos con ruido, se utiliza como entrada para entrenar esta red, de manera que se consigue clasificar cada trama en voz o no voz. Esta clasificaci´on es ´util para la red que se encarga de hacer la limpieza. A continuaci´on de la Red Neuronal de Detecci´on de Actividad de Voz se implementa otra, con el objetivo de eliminar el ruido. El m´odulo junto con la etiqueta obtenida en la red anterior ser´an la entrada de esta nueva red. En esta segunda etapa tambi´en se optimiza la primera para adaptarse a la tarea final. Las Redes Neuronales requieren bases de datos para el entrenamiento. En este proyecto se ha utilizado el Timit corpus [9] como base de datos de voz limpia (objetivo) y el QUT-NOISE TIMIT [4] como base de datos con ruido (fuente). A continuaci´on, el M´odulo de S´ıntesis de Se˜nal reconstruye la se˜nal de voz limpia a partir del m´odulo sin ruido y la fase original. Finalmente, los resultados obtenidos por el sistema fueron analizados utilizando medidas objetivas y subjetivas. 3 Acknowledgements First of all, I want to thank my project supervisor, Antonio Bonafonte C´avez, for offering me the chance to collaborate in this project. Thank you for your dedication and your patience when guiding me and teaching me. I would also like to thank Santiago Pascual for all the help he provided me on topics like Deep Learning. A special thank to my colleague Albert Aparicio for helping me in all my doubts. To my family. Nu s-au inventat ˆınca cuvinte care s˘a descrie recuno¸stint¸a pe care v-o port. V˘a mult¸umesc pentru educat¸ia ¸si pentru aceast˘a viat¸˘a minunat˘a pe care mi-at¸i oferit-o . Sunt con¸stient c˘a nu a fost u¸sor ¸si ¸stiu nenum˘aratele sacrificii pe care le-at¸i f˘acut pentru a-mi oferi ¸sansa de a m˘a afla ast˘azi aici. Mama, Tata, Ioana, Tata Nelu, Mimi ¸si Camelia v˘a iubesc! To Graciela. Siempre estuviste a mi lado, apoyandome en lo bueno, pero sobre todo en los momentos complicados. S´e que estos ´ultimos a˜nos los sufriste codo con codo conmigo, o incluso m´as. Eres el faro que me ilumina el camino d´ıa a d´ıa. Por todo ´esto y m´as, gracias. Ahora se abrir´a una nueva et´apa en nuestras vidas y juntos la disfrutaremos. To Adri`a. Ay amigo! Al final el t´unel se acab´o. Parec´ıa eterno, no? Te hablar´ıa de todos los d´ıas juntos pero me extender´ıa m´as que en la tesis. El t´unel ha acabado pero el camino sigue y juntos lo seguieremos recorriendo. Para acabar, gracias por conocerte en ese Laboratorio de F´ısica. 4 Revision history and approval record Revision Date Purpose 0 05/12/2016 Document creation 1 27/12/2016 Document 1st revision 2 03/01/2017 Document revision 3 13/01/2017 Document approbation DOCUMENT DISTRIBUTION LIST Name e-mail Dan Mihai Badescu [email protected]c.edu Antonio Bonafonte C´avez [email protected] Written by: Reviewed and approved by: Date 10/01/2017 Date 13/01/2017 Name Dan Mihai Badescu Name Antonio Bonafonte C´avez Position Project Author Position Project Supervisor 5 Contents 1 Introduction 10 1.1 Statementofpurpose................................ 10 1.2 Requirements and specifications . . . . . . . . . . . . . . . . . . . . . . . . . . 11 1.3 Methodsandprocedures .............................. 11 1.4 WorkPlan...................................... 12 1.4.1 WorkPackages ............................... 12 1.4.2 GanttDiagram ............................... 13 1.5 Incidents and Modification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 2 State of the art of Deep Learning techniques and Speech Enhancement 14 2.1 DeepLearning.................................... 14 2.2 SpeechEnhancement ................................ 17 3 Speech Enhancement using Deep Learning development 19 3.1 QUT-NOISE-TIMIT Dataset . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 3.2 Audio Analysis and Synthesis . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 3.3 Proposed Deep Neural Network architecture . . . . . . . . . . . . . . . . . . . . 22 3.3.1 Keras .................................... 22 3.3.2 Speech Activity Detection DNN . . . . . . . . . . . . . . . . . . . . . . 23 3.3.3 Denoising Auto Encoder . . . . . . . . . . . . . . . . . . . . . . . . . . 25 3.3.4 Jointtraining ................................ 25 4 Results 27 4.1 EvaluationMeasures................................. 27 4.2 Experimental Results and Discussions . . . . . . . . . . . . . . . . . . . . . . . 28 5 Budget 29 6 6 Conclusions and future development 30 7 List of Figures 1.1 Global architecture of the solution . . . . . . . . . . . . . . . . . . . . . . . . . 12 1.2 Gantt Diagram of the Degree Thesis . . . . . . . . . . . . . . . . . . . . . . . . 13 2.1 Logistic classifier diagram [14] . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 2.2 2-layer fully-connected diagram [14] . . . . . . . . . . . . . . . . . . . . . . . . 15 2.3 CNN exploiting spatially correlation [7] . . . . . . . . . . . . . . . . . . . . . . . 16 2.4 CNNfeaturemap[7] ................................ 16 2.5 Recurrent Neural Network diagram . . . . . . . . . . . . . . . . . . . . . . . . . 16 2.6 LTSMmemoryblock[1]............................... 17 3.1 Windowing effect over the audio signal [12] . . . . . . . . . . . . . . . . . . . . 21 3.2 Analysis process of a frame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 3.3 Speech Activity Detection NN diagram . . . . . . . . . . . . . . . . . . . . . . . 24 3.4 SADtrainingevolution ............................... 25 3.5 SAD-DNN and DAE joint diagram . . . . . . . . . . . . . . . . . . . . . . . . . 26 3.6 Systemdiagram ................................... 26 8 Y=WX +b(2.1) The weights and the bias are the key for the network to learn. The aim of the network is to learn the weights and the bias parameters that minimize the error from the training data [14]. The function that measures the error is called loss function. A common loss function is the Cross- Entropy or the Mean Square Error loss. The first one is more common in classification while the other is used more in regression. In order to minimize the error, an optimizer is requested. A classic optimizer is the Gradient Descendent, in particular the Stochastic Gradient Descendent. Linear models are stables but, very limited. Therefore, in order to keep the parameters in linear functions and make the entire model non-linear, a step further must be done and introduce non-linearities [14]. Figure 2.2: 2-layer fully-connected diagram [14] In Figure 2.2 a fully-connected Neural Network diagram is represented. In order to introduce non-linearity to the model, a non-linear function must be inserted [14]. The most simple nonlinear function, which can be observed in Figure 2.2, is the Rectified Linear Units function (ReLU). The number of non-linear functions units is the number of ”hidden layers”, which is another parameters to tune. Finally, the concepts of epoch, batch size, iteration,learning rate and overfitting must be explained. The epoch is associated to the processing of the entire training dataset before the gradient is recalculated. The batch, on the other hand, is associated to calculate the gradient over smaller portions of the dataset, so several iterations will be required before an epoch is completed. This is an advantage, as the system is faster. Therefore, it is required to establish a batch size. As its name indicates, the learning rate sets the speed of learning. High learning rates increase the error while low learning rates increase the overfitting. When overfitting appears the train should stop. To identify it, the train loss and the validation loss must be observed. When the validation loss is increasing and the train loss is decreasing, it is a clear signal of overfitting. Another class of Neural Networks is the Convolutional Neural Networks(CNN). They are design to exploit spatially-local correlation by enforcing a local connectivity pattern between neurons of adjacent layers [7]. In other words, the inputs of hidden units in layer m, are from a subset of units in layer m-1, units that have spatially contiguous receptive fields as we can see in the figure below: 15 Figure 2.3: CNN exploiting spatially correlation [7] In addition, each filter h i is replicated across the entire layer. These replicated units share the same parametrization (weight vector and bias) and form a feature map. In Figure 2.4 a CNN feature map can be observed. Figure 2.4: CNN feature map [7] For these reasons, Convolutional Neural Networks are perfectly fit for image and video processing, but also for audio processing. On the other hand, there are the Recurrent Neural Networks (RNN) which, unlike the Convolutional Neural Networks, are going to extract patterns over time instead of space. This networks are characterized by being trained with sequences of related data and having memory cells.For this reason they are perfect for speech processing task. To understand better how Recurrent Neural Networks works, the Figure 2.5 represent its common architecture. Figure 2.5: Recurrent Neural Network diagram Given a input sequence x= (x1, ..., xT), a standard Recurrent Neural Network computes the hidden vector sequence h= (h1, ..., hT)and the output vector sequence y= (y1, ..., yT)by iterating the following equations [1]: ht=H(Wxhxt+Whhht−1+bh)(2.2) yt=H(Whyht+by)(2.3) 16 The Wdenotes the weight matrices, the bdenotes the bias vectors and the His the hidden layer function, which usually is a non-linearity such as sigmoid,ReLU or tanh. One of the most efficient implementation of the Recurrent Neural Networks are the Long Short-Term Memory (LTSM). The LSTM contains special units called memory blocks in the recurrent hidden layer. As it can be observed in Figure 2.6, memory blocks contain memory cells with self-connections storing the temporal state of the network. In addition, they also contain special multiplicative units, called gates, to control the flow of information. Furthermore, an input and an output gate can be found in a memory block. The input gate controls the flow of input activations into the memory cell, while the output gate controls the output flow of cell activations into the rest of the network. In newer architectures a forget gate was added in order to prevent the LTSM from processing continuous input streams that are not segmented into subsequences. The forget gate scales the internal state of the cell before adding it as input to the cell through the self-recurrent connection of the cell, therefore adaptively forgetting or resetting the cell’s memory. The latest LTSM architectures contain peephole connections which connect the internal cells to the gates in the same cell in order to learn the precise timing of the outputs [8]. Figure 2.6: LTSM memory block [1] 2.2 Speech Enhancement For several decades, Speech Enhancement has been the research to enhance noisy speech signals that are corrupted by additive noise, multiplicative noise or convolutional noise[2, 13, 17, 16] .After many years of study, it still a very challenging problem, because most papers rely on estimating the noise during the non-speech activity assuming that the background noise is uncorrelated, non-stationary and slowly varying [2, 13, 17, 16]. Therefore, the noise characteristics estimated in the absence of speech can be used subsequently in the presence of speech, whereas in real time environment such as assumptions do not hold for all the time. [11] Until very recently the main algorithms used to develop Speech Enhancement systems were broadly classified in four categories: •Spectral subtractive algorithms. The idea behind this algorithms is estimating the noise spectrum during non-speech regions and subtracting it from the speech.[10] •Statistical-model-based algorithms. They are based on the principle of stochastic estimation 17 (Minimum Mean Square Error, Maximum Likelihood Estimation, etc.) of the magnitude of Speech Spectrum.[10] •Subspace algorithms, assuming the clean signal to be a subspace of noisy signal.[10] •Binary Masking algorithms. Their goal is to eliminate certain frequency bins by applying a threshold on the Signal-to-Noise Ratio (SNR).In order to achieve it, firstly, a binary mask must be applied to the time-frequency representation of the noisy signal.[10] During the last years new approaches emerged, basing the algorithms on Deep Learning. In Speech Processing, the Neural Network architectures adopted for denoising are refereed to, as Denoising Auto-Encoders (DAE). A DAE is Neural Network which attempts to map noisy inputs to their clean versions [10].It has proved to be more robust and provide better results in terms of subjective and objective evaluations [10]. Recurrent Neural Networks are also used for denoising task. The architecture based on Recurrent Neural Networks are called Recurrent Denoising Auto- Encoders (RDAE) and they have shown significant performance exploiting the temporal context information in embedded signals . However, the best Deep Neural Networks applied for denoising task are the Long Short-Term Memory (LTSM) [10, 2, 13]. For this thesis we adopted a recent proposal [10] to enhance speech signals using Deep Learning. In the following chapter we will present the development required to implement a Deep Neural Network architecture capable of eliminating noise from speech signals. 18 Chapter 3 Speech Enhancement using Deep Learning development This chapter describes the required stages to implement an architecture capable of mapping noisy speech signals to their clean versions, using Deep Learning. Firstly, we will explain the dataset used to train and test the models. Then the modules which prepare the data for the Neural Network will be introduced. Finally, we will present the proposed Neural Network architecture. 3.1 QUT-NOISE-TIMIT Dataset In order to train and test the system, QUT-NOISE-TIMIT dataset has been used [5]. It is build from to different databases, QUT-NOISE[4] corpus and Timit corpus [9]. QUT-NOISE is used to provide the background noise, while Timit is providing the clean speech. In order to provide a simulation of noisy speech in a wide variety of typical background noise conditions, QUT-NOISE corpus provides ten locations in five different scenarios: •CAFE: The two locations of the CAFE scenario were a typical outdoor cafe environment (CAFE-CAFE) and a typical indoor shopping centre food-court (CAFE-FOODCOURTB) [5, 4]. •HOME: The two locations for the HOME scenario were in the kitchen (HOME-KITCHEN) and living-room (HOME-LIVINGB) during typical home activities [5, 4]. •STREET: The two locations for the STREET scenario were at the roadside near typical inner-city (STREET-CITY) and outercity (STREET-KG) traffic-light controlled intersections [5, 4]. •CAR: For the CAR scenario the noise was measured in the car with the windows down (CAR-WINDOWNB) and with the windows up (CAR-WINUPB) [5, 4]. •REVERB: The two locations for the REVERB scenario were an enclosed indoor pool (REVERB-POOL) and an partially enclosed carpark (REVERB-CARPARK) [5, 4]. The duration of each file of noise can be observed in the following table: 19 Noise Duration (min) CAFE-CAFE 1 42:12 CAFE-CAFE 2 39:33 CAFE-FOODCOURTB 1 35:04 CAFE-FOODCOURTB 2 32:05 HOME-KITCHEN 1 33:10 HOME-KITCHEN 2 50:45 HOME-LIVINGB 1 40:51 HOME-LIVINGB 2 40:33 STREET-CITY 1 32:49 STREET-CITY 2 33:06 STREET-KG 1 56:58 STREET-KG 2 47:51 CAR-WINDOWNB 1 44:35 CAR-WINDOWNB 2 43:18 CAR-WINUPB 1 43:03 CAR-WINUPB 2 47:35 REVERB-POOL 1 38:22 REVERB-POOL 2 36:22 REVERB-CARPARK 1 42:10 REVERB-CARPARK 2 38:29 Table 3.1: Duration noise files in QUT-NOISE dataset The final QUT-NOISE-TIMIT corpus consists of 600 hours of noisy speech sequences created by mixing 10 hours of noise with TIMIT clean speech [10]. It is classified into three categories based on the amount of noise: •Low noise: SNRs of 15dB and 10dB •Medium noise: SNR of 5dB and 0dB •High noise: SNR of -5dB and -10dB For the Neural Network architecture training, only the low noise subset is considered (15dB and 10dB). 3.2 Audio Analysis and Synthesis The first stage of the project consists in implementing the Analysis and Synthesis modules which allows to extract the features necessary for training and testing the architecture. The Analysis Module takes the wav files from database directory and extract their spectrogram magnitudes and phases. The log-power spectrum is used as a input for the Neural Networks 20 models, while the phase will be used in the Synthesis Module, in order to reconstruct the wav signal. The transform used for this task was the Short Time Fourier Transform (STFT). The formula for the STFT is the following: Xl[k] = N/2−1 X n=−N/2 w[n]x[n+lH]e(−j2πkn/N)(3.1) where lis the frame number, wis the analysis window and His the hoop size. In order to implement the STFT the code provided by the ”sms-tools” [12] has been used. To windowing the signal, Hamming window has been used, with a length of 200 samples. The hoop has been established in 100 samples, and the sampling frequency in 16 kHz [12]. In Figure 3.1 it can be appreciated the windowing effect over an audio input signal. Figure 3.1: Windowing effect over the audio signal [12] The entire analysis of a frame can be observed in Figure 3.2. Figure 3.2: Analysis process of a frame 21 The Synthesis Module consists in reconstructing wav file from the clean speech magnitude obtained at the output of the Neural Network and the phase previously calculated in the Analysis Module [12]. In order to accomplish it the Inverse Short Time Fourier Transform (ISTFT) has been implemented. The formula for the ISTFT is the following: y[n] = L−1 X l=0 ShiftlH,n[1/N N/2−1 X k=−N/2 Xl[k]ej2πkn/N ](3.2) Shift operation must be implemented to undone the overlapping process during the windowing in the Analysis module. Therefore, the formula to obtain each output frame is: ywl[n] = x(n+lH)w[n](3.3) and the output sound is: y[n] = x[n] L−1 X l=0 w[n−lH](3.4) To implement the ISTFT, the code provided by the ”sms-tools”[12] has been reused. 3.3 Proposed Deep Neural Network architecture This thesis implements a 2 stage Deep Neural Network architecture for denoising and speech enhancement in noisy environments. Previous studies have shown that providing speech detection along input have yielded performance benefits [10]. The architecture includes a Speech Activity Detection DNN (SAD-DNN) followed by a Denoising Auto Encoder (DAE). The Speech Activity Detection DNN will provide the speech and non-speech region markings, which enable the Denoising Auto Encoder to implicitly compute the underlying noise statistics over the nonspeech regions, and exploit them in order to improve the denoising process. 3.3.1 Keras Keras is a high-level neural networks library, written in Python and capable of running on top of either TensorFlow or Theano[3]. It allows a fast and easy implementation of Neural Networks architecture due to its total modularity, minimalism, and extensibility[3]. Furthermore, it support convolutional networks, recurrent networks and combinations of both, including multi-input and multi-output training[3]. It can run seamlessly on CPU and GPU[3]. The first variable that affects the implementation with Keras is whether it has multi-input and multi-output or not. For complex models with multi-input and multi-output Keras Functional API 22 is the best choice to start implementing. Otherwise, for simple implementations the Sequential model should be enough. Besides Keras Functional API and the Sequential model use a different syntax, the implementation is similar. The first step consists in defining the model and adding the layers, specifying the type (Dense, SimpleRNN, LTSM, GRU, etc.), the input and output dimensions and the activation function (relu, sigmoid, tanh, etc.) which introduce the non-linearity. For complex architectures, where the NN has at the input the output of another one, it is required a previous load of weights. To concatenate both models the ”merge” function is a very useful tool[3]. The next step consists in compiling the model using the function ”compile”. Here is where the optimizer and the loss function are declared[3]. Finally, we proceed to train the Neural Network. For small amount of data, ”fit” [3] function is the easiest method to train. It takes as an argument the entire input data (source) and output data (target), which is loaded in RAM memory, the batch size, the number of epochs and the validation dataset (source and target). However, Deep Neural Networks require very big dataset which can not be loaded in RAM memory. The function provided by Keras in this situation is the fit generator [3]. Unlike the fit, the fit generator requires the implementation of a Generator for both, training and validation dataset. The aim of the Generator is to load batches directly from disk and feed the Neural Network. The output of the Generator is a tuple, corresponding to the source and target samples. Once the Neural Network is trained, it is evaluated using a different dataset, the test dataset. To do the prediction, Keras provides the predict [3] function, in case the network was trained with fit. For big testing datasets, predict generator [3] is more adequate. It requires the implementation of a Generator as well[3]. 3.3.2 Speech Activity Detection DNN As it is mentioned previously, the Deep Neural Networks is implemented in 2 stages. The first stage is comprised by a Speech Activity Detection DNN (SAD-DNN), which will predict 0 for the non-speech regions and 1 for the speech regions . It consists of a 2 layer fully connected Neural Network, as it can be observed in Figure 3.3 . In order to tune the parameters of the model, a Rectified Linear Unit (ReLU)[3] has been used as an activation function for the first hidden layer, with a dropout of 0.5. For the output layer, the activation functions has been set with a Sigmoid function. To measure the loss, the Binary Crossentropy [3] function has been set with an Adam optimizer [3]. Due to the dimensions of the database, the fit generator and predict generator functions have been used to train and test the model. They required the implementation of generator functions which were in charge to feed the network with batches of 257 features which corresponds to a audio frame. 23 Figure 3.3: Speech Activity Detection NN diagram The parameters used to implement the Speech Activity Detection DNN can be observed in the following table: Parameter Value Dense 1 output size 257 Dense 1 input size 257 Dense1 Activation relu Dropout 2 0.5 Dense 1 output size 1 Dense1 Activation sigmoid Optimizer 1 Adam Learning rate 2 0,002 Epochs 50 Table 3.2: SAD-DNN configuration In Figure 3.4 the evolution of the training session can be observed. Both, training loss and validation loss have an abrupt slope the first 5 epochs, which then tends to be constant. Analysing Figure 3.4, the training could had continued for several epochs before reaching overfitting. 24 Bibliography [1] Abdel-rahman Mohamed Alex Graves and Geoffrey Hinton. Speech recognition with deep recurrent neural networks. http://www.cs.toronto.edu/~fritz/absps/RNN13.pdf, 2013. Last accessed 7 January 2017. [2] Dinei Florencio Anurag Kumar. Speech enhancement in multiple-noise conditions using deep neural networks. In Proc.Interspeech Conference, pages 3738–3742, 2016. [3] Francois Chollet. Keras. https://github.com/fchollet/keras, 2015. Last access 11 January 2017. [4] Robert Vogt Michael Mason David Dean, Sridha Sridharan. Qutnoise corpus. https://www.qut.edu.au/research/research-projects/ speech-audio-image-and-video-technology-saivt, 2010. Last accessed 7 January 2017. [5] Robert Vogt Michael Mason David Dean, Sridha Sridharan. The qut-noise-timit corpus for the evaluation of voice activity detection algorithms. https://eprints.qut.edu.au/ 38144/, 2010. Last accessed 7 January 2017. [6] Li Deng and Dong Yu. Deep learning: Methods and applications. Foundations and Trendsˆ AR in Signal Processing, 7(3-4):197–387, 2014. [7] Laboratoire d’Informatique des Syst`emes Adaptatifs. Convolutional neural networks. http: //deeplearning.net/tutorial/lenet.html, 2016. Last accessed 7 January 2017. [8] Andrew Senior Ha¸sim Sak and Fran¸coise Beaufays. Long short-term memory recurrent neural network architectures for large scale acoustic modeling. In Proc. Interspeech Conference, 2014. [9] William Fisher Jonathan Fiscus-David Pallett Nancy Dahlgren Victor Zue John Garofolo, Lori Lamel. Timit corpus. https://catalog.ldc.upenn.edu/ldc93s1, 1993. Last accessed 7 January 2017. [10] Panayiotis Georgiou Prashanth Guruntah Shivakumar. Perception optimized deep denoising autoencoders for speech enhancement. In Proc.Interspeech Conference, pages 3743–3747, 2016. [11] R. Shantha Selva Kumari S. Selva Nidhyananthan and A. Arun Prakash. A review on speech enhancement algorithms and why to combine with environment classification. https: //www.worldscientific.com/doi/pdf/10.1142/S0129183114300024, 2014. Last accessed 7 January 2017. [12] Xavier Serra. Audio signal processing for music applications. https://www.coursera. org/learn/audio-signal-processing, 2016. Last accessed 7 January 2017. [13] Li-Rong Dai Chin-Hui Lee Tian Gao, Jun Du. Snr-based progressive learning of deep neural network for speech enhancement. In Proc.Interspeech Conference, pages 3713–3717, 2016. [14] Vincent Vanhoucke. Deep learning course. https://www.udacity.com, 2016. Last accessed 7 January 2017. [15] B. Xia and C. Bao. Speech enhancement with weighted denoising auto-encoder. In Proc.Interspeech Conference, pages 3444–3448, 2013. 31 [16] Shigeki Matsuda Chiori Hori Xugang Lu, Yu Tsao. Speech enhancement based on deep denoising autoencoder. https://www.researchgate.net/publication/283600839_ Speech_enhancement_based_on_deep_denoising_autoencoder, 2013. Last accessed 7 January 2017. [17] Li-Rong Dai Yong Xu, Jun Du and Chin-Hui Lee. An experimental study on speech enhancement based on deep neural networks. In IEEE SIGNAL PROCESSING LETTERS, volume 21, pages 65–68, 2014. 32