0
$\begingroup$

all, I have an audio recording that contains several frequency-modulated elements (think animal calls like birds/bats). I have read this file into Matlab using 'audioread' and plotted the oscillogram from which I took timing information (duration, interval of calls, etc...). I then used the 'spectrogram' function to plot the frequencies. I don't fully understand the output of this function [s,f,t] = spectrogram(signal,window,overlap,fft,Fs). I know that 's' should yield my frequencies but this is a matrix of complex numbers and I'm not sure what to do with it. There is a ton of information on generating these values but I can't seem to find anything about what to do after. My ultimate goal is to isolate each element of the audio file (i.e. each chirp/call) and determine the highest, lowest, and peak frequencies as well as overall bandwidth. The method I used to isolate each call is to use the on- and offset of each element to determine a slice and then perform a separate FFT (using spectrogram function) for each slice. This gives me 's','f', and 't' for each element but I'm still not sure how to manipulate this output to get the desired metrics. If anyone has a solution for all or part of my issue, or can perhaps just explain the concepts I am missing, I would be very appreciative.

This is an example of the type of audio files I have. This was generated using an FFT size 512. Spectrogram of audio file

When I attempt to isolate the first element in the above spectrogram, I take a time slice and generate another spectrogram (also FFT = 512) and get this. This is not actually what I want to generate. enter image description here

I would like to see something like this (a zoomed in version of the first plot). enter image description here

So that I can measure these parameters, preferably not by hand as there are hundreds of thousands of them. enter image description here

$\endgroup$
  • $\begingroup$ If you call the function without outputs, it generates a graphic which you can ponder $\endgroup$ – Stanley Pawlukiewicz May 17 '18 at 19:15
  • $\begingroup$ Yes, I've seen the graphic. But it doesn't actually tell me how to get the additional information I am looking for unless I'm doing it manually. In the end, I have several hundred files each with dozens of calls and I'd like to automate the process as much as possible. Thanks. $\endgroup$ – Anna May 17 '18 at 22:02
  • $\begingroup$ Perhaps if you added a plot to your question, someone could make some suggestions. $\endgroup$ – Stanley Pawlukiewicz May 17 '18 at 22:29

Your Answer

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

Browse other questions tagged or ask your own question.