Session Ready
Exercise

Spectrograms of heartbeat audio

Spectral engineering is one of the most common techniques in machine learning for time series data. The first step in this process is to calculate a spectrogram of sound. This describes what spectral content (e.g., low and high pitches) are present in the sound over time. In this exercise, you'll calculate a spectrogram of a heartbeat audio file.

We've loaded a single heartbeat sound in the variable audio.

Instructions 1/2
undefined XP
  • 1
  • 2
  • Import the short-time fourier transform (stft) function from librosa.core.
  • Calculate the spectral content (using the short-time fourier transform function) of audio.