Implemented a Heart Audio Classifier using Methods of CNN and RNN in Deep Learning.
For the Heart Sound Challenge, the most ideal dataset to use was the PhysioNet/PASCAL database because the dataset's audio file has been taken via both clinical methods (i.e. a Digital Stethoscope) and also general methods (i.e. an iPhone Stethoscope app).
Note: The Repo does not contain the audio files for Heart Sounds, this repo only showcases the code for the algorithms used
In the CNN approach, a spectrogram was made using a Short Term Fourier Transform of all the Audio Files using the tf.signal module. All the spectrograms were then all spaced out to a consistent length for the CNNs input size.

The Convolutional Neural Network was used for a multiclass Image Classification using the tensorflow keras library. It has 2 Conv2D layers which gets flattened into a Fully Connected Layer which classifies audio data.
For The RNN Approach, we first built a dataloading function loading audio file and extracting the features using Mel Frequency Cepstrum Coefficients (MFCCs)
We then built a Bidirectional LSTM Model with the extracted Features. Bidirectional LSTM (BiLSTM) is a recurrent neural network. Unlike standard LSTM, the input flows in both directions, and it’s capable of utilizing information from both sides. It’s also a powerful tool for modeling the sequential dependencies between audio signals in both directions of the sequence.
The outcome after running both the models: -
CNN Model - It achieved an Accuracy of 80%. RNN Model - It achieved an Accuracy of 75%


