The main.ipynb file contains the code used for the creation of this machine learning model. We used a convolutional neural network trained on images displaying various features of the audio file such as spectrograms and chromograms. These images were produced from the audio files using librosa. The database we used was the Respiratory Sound Database on Kaggle. Read the paper for this database here.
The machine learning model we created was able to distingiush between the respiratory sounds of chronic obstructive pulmonary disease (COPD), upper respiratory tract infections (URTI), bronchiectasis, pneumonia, bronchiolitis, and healthy patients. After training the model several times, we achieved an average accuracy of 97%, with a low of 95% and a high of 99%.
A portion of the code is adapted from here.