I need to identify certain features of the audio signal recorded from microphone in stethoscope. These sounds are only samples i've found, but the final signal will be probably a bit noisier (maybe not, i don't know yet). Below are examples of three signals. Normal one and one of the person sick with atrial spatial defect, third one is of person with late aortic stenosis. These two fluctuations are named S1 and S2 respectively and they are my main subject of interest. Depending on a given heart condition S1 may have doubling and there may be some "noisy" sounds (clicks also) between S1 and S2. The length of the whole cycle (S1, S2) may vary depending on the heart rate.

My question is, what kind of processing should i perform to surely extract and recognize those features, i.e. two large fluctuations normally, with slight delay between them and if person is sick it may be either something before S1 or between S1 and S2 or S1 may double a bit. Also normally S1 has a larger amplitude spike than S2 as i understand.

I have very limited knowledge in this field and not sure about what options are available to me. FFT magnitude graphs are showing somewhat recognizable results, but i think there is too much unneeded information there and they are not so distinct.

The samples themselves can be found here: Washington University: Heart sound samples

Normal heart sound: Normal heart sound Atrial spatial defect heart sound: Atrial spatial defect heart sound Late aortic stenosis: Late aortic stenosis


Some tips that might help:

  1. Your FFT should be shorter than the features you are trying to detect. An FFT will be calculated for a specific number of samples. This represents a certain length of time (1024 samples at 1kHz sampling rate is 1024 milliseconds.) If the time period of your FFT is longer than your signal features then they will all be smeared together - you won't be able to identify the features. You will have to find a compromise for your FFT length between enough frequency resolution and enough time resolution. The needed frequency resolution depends on the frequency content of features you need to detect, time resolution depndes on the length of the features (as well as the length of time when there are no features - which is itself perhaps a feature you need to take note of.)
  2. Classify the features as to frequency range. Make an average of the FFT-points for those ranges - this will give you the intensity of that feature.
  3. Plot the intensity of the features against time.
  4. Locate groupings of feature intensities that are unique for each type of heart defect - these are the things you need to be able to recognize. For example: Pulmonic stenosis has low frequency (normal heart beat sound) with high frequency (murmur) at the same time, but no murmur type sound between beats - but it also has a click that you will need to detect.
  5. You will need to detect the S1 and S2 by the pause between beats - long pause followed by short means that the last beat is the S2.
  6. The examples on the site you referenced have been cleaned up, but they still have things that might try to sneak in as features. I hear a 60Hz power hum, and some ringing from the filters that were used to clean things up. There is also some sone background "white" noise in some of them.

I would try loading the files into Baudline and seeing how to identify the features and their combinations by eye first. Baudline can show you how the freqeuncy content varies with time so that you can see the relationships between features and relative timing. Use Audacity to convert the mp3 files to wav and to downsample to 1000Hz sampling rate before loading in Baudline.

The Baudline Color Aperture is handy for making certain parts of the diagram standout - this can make it easier to identify features.

Baudline is for Unix type systems only (Linux, BSD, Mac OSX) but I'm sure there's similar software for Windows. Audacity is available for Windows as well as Linux and OSX.


It looks to me like you can identify the differences between the three signals based on the spectral content and the absolute hilbert envelope.

There is a lot more high frequency content in the defective heart beats so you can compare FFT magnitudes in the upper frequencies.

The envelopes of the healthy signal are nice curves, like a cosine window, so again you could measure how far the envelope differs from a cosine window or the envelope of the healthy heart beat.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.