9
$\begingroup$

I am trying to write an algorithm that would automatically segment a piece of audio with bird calls recordings. My input data are 1 minute-long wave files and on the output I would like to get separate calls for further analysis. Problem is that signal-to-noise ratio is quite terrible due to environmental conditions and poor quality of a microphone (mono, 8 kHz sampling).

I would be most grateful for any advice on how to proceed further with noise reduction.

Here is an example of my input, one minute audio recording in wave format: http://goo.gl/16fG8P

This is how the signal looks like:

My input signal (8 kHz). Marked areas indicate bird calls

Band-pass filtering, in which I am keeping only anything in between 1500 - 2500 Hz, does improve situation, but still it is far from expectations. In this spectrum still a lot of noise is present.

Spectrogram

I have also plotted long-term (over 32-sample intervals) average energy and removed some clicks from it. Here is the result:

Long-term average energy

With all the remaining noise I have to set a very low threshold to the onset detection algorithm to pick last 10 seconds of bird calls. Problem is if I tweak it in such a way then in next recording I can get load of false positives.

Moving average filter helps a bit with wind noise. Any other ideas? I was thinking of "Spectral Subtraction", but here it seems to me I have sort of chicken and egg problem - to find noise-only area I have to segment the audio and to segment the audio I need to remove the noise. Do you know of any libraries that have this algorithm or some implementations in pseudo-code? Methinks Audacity uses such a method to remove noise. It is very effective, but it is left to the user to mark noise-only area.

I am writing in Python and it is a free, open-source project.

Thanks for reading!

$\endgroup$
3
  • $\begingroup$ Welcome to DSP.SE. This is an awesome question! I hope you can get some good leads here. $\endgroup$
    – Phonon
    Oct 27, 2013 at 22:56
  • $\begingroup$ @Lukasz Tracewski Respected sir: Even though its too late but i m working on same project so i m having problem like how i can make spectrogram from wav file.you can save my further time as i m trying to solve this issue from last 2 months. Thanks in advance.Any hel would be highly appreciated $\endgroup$ Oct 7, 2019 at 16:35
  • $\begingroup$ @MubeenKhan You mean help with producing spectrogram from an audio file? There are dozens of tools and libraries fit for the purpose, do you need any recommendation? Or are you asking about noise reduction? $\endgroup$ Oct 7, 2019 at 21:42

2 Answers 2

6
$\begingroup$

At the end what has proven to be the best solution was onset detection based on either high frequency or energy content. Before it could work I had to use high-pass filter to cut out first 1 kHz, since it contained too much noise.

Once I had noise-only area I could use its profile to reduce noise from rest of the sample.

One library I found particularly useful was Aubio. It has a good set of examples and provides a lot of algorithms to choose from for onset detection.

$\endgroup$
0
$\begingroup$

I don't know much of audio noise reduction but after a quick and dirty noise subtraction from the pass-band filtered (around 1500-3000 hz) I get this:

https://dl.dropboxusercontent.com/u/98395391/signal_denoised.wav

I think it sounds just a bit better of the filtered and original signals.

With a simple Wiener filter I get very similar results.

$\endgroup$
1
  • $\begingroup$ Unless I misunderstood you, then it seems you are referring to something I already did in second paragraph of my question (just below first graph). With method described in my answer I was able to find all onsets and then apply spectral subtraction, which gives even better results. Regrettably it also produces so-called "musical tones", which are now my primary concern. Thanks anyway! $\endgroup$ Dec 24, 2013 at 8:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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