What I am attempting to do is take a signal (.wav audio file) which contains calls from different Bat species. Here is a graph representation of the signal:

enter image description here

What I have done so far is:

1) Emphasise the signal

2) Compress the signal

This is the output I got plotted:

enter image description here

I need to remove the signals that do not warrent consideration. At the moment, the signal is in a 1D representation, and, after the Separation has been completed the signal will be a 2D representation containing JUST the calls, thus I can perform analysis on each of the calls.

This is my suggested methodology to do this:

1) Split the signal into blocks of: 256x100 (so they overlap)

2) Calculate the RMS (Root-mean-square) of each of the blocks

3) Compare (2) to a threshold value, and, if the block warrants consideration then this can be classed as a call.

But the problem is this:

1) Will splitting the signal into blocks of 256x100 go over the calls and thus making some of the calls lost when calculating the RMS?

2) How do I therefore pick a suitable threshold value? Would finding the peaks in the signal be an accurate assumption for this?

I hope someone can help me :)

  • $\begingroup$ How about labelling your axes? It's hard to tell what your plotting here. $\endgroup$ Commented Sep 15, 2013 at 21:40
  • $\begingroup$ @leftaroundabout I'm basically plotting the time (X axis) and the magnitude (Y) $\endgroup$
    – Phorce
    Commented Sep 16, 2013 at 11:40
  • $\begingroup$ How does the signal look like? Is there relative silence and the bat sounds are clear peaks in the signal? Are the bat sounds reasonably far apart? Maybe you could just get along with some simple energy detection. But it would be easiest if you could provide a sample along with a manual classification of what you want. $\endgroup$
    – jan
    Commented Sep 17, 2013 at 12:16
  • $\begingroup$ Is the X axis one night, in seconds? One short fragment, in milliseconds? In individual samples, and if so, what's the sample period? $\endgroup$
    – MSalters
    Commented Sep 17, 2013 at 13:43
  • $\begingroup$ @MSalters I don't know what the sample period is.. I believe it's in milliseconds.. $\endgroup$
    – Phorce
    Commented Sep 17, 2013 at 14:54

2 Answers 2


If you are using Matlab, the plots looks like Matlab, you can use indexing directly to get a threshold value:

% 'time' is the time series
% 'signal' is the signal itself
idx = signal > 0.2;
plot(time(idx), signal(idx));

You are not clear on what you're trying to achieve, but there could be some information found in the frequency spectrum, so that you could do for example a fourier transform on the signal.


This sounds like you are trying to separate noise from signal, and subsequently separate various mixed signals. This is a good candidate for independent component analysis (ICA) with a caveat. It is unclear how you got from your first signal to the second, and it is unclear if the bat signals are individual chirps/bleats at one time point or if they constitute a time series of various magnitudes and durations. If the the latter, you can use ICA to decompose the spectrogram of the original mixed signal (your figure 1). I doubt RMS of overlapping windows will give you good signal indicators unless you are simply looking to characterize particular magnitudes of very small duration.

  • $\begingroup$ Hey, thank you so much for your reply. I basically used compression on the signal with a param of 1.0 (as recommended on another stackexchange site) basically, my problem is that I need to separate the signals. Assume, for now, I have the words "The bat went into the cave" -> This would then become "The", "Bat", "Went", "Into", "The", "Cave" does this make more sense? Any help whatsoever would be greatly appreciated :) $\endgroup$
    – Phorce
    Commented Sep 17, 2013 at 10:36
  • $\begingroup$ I updated with example data in your other question $\endgroup$
    – wwwslinger
    Commented Sep 19, 2013 at 7:49

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