How to subtract two almost identical audio files?

7 views (last 30 days)
Hi all,
I have sets of two audio files, one of a song, and one of a recording of the song & and bird, and I am trying to isolate the bird call from the song by subtracting the audio file from my data, but the resulted subtracted array sounds/looks almost exactly the same as the data file (using sounds), even after xcorr alignment. Any tips as to how I should approach this?

Answers (1)

Star Strider
Star Strider on 15 Jul 2014
I can’t speak from personal experience (I’ve not done what you’re doing), but one possibility I would experiment with is to do the ‘extraction’ in Fourier space. If the lengths of the files are the same, the song amplitudes are the same, and the sampling frequencies are the same, take the FFT of both signals and divide song+bird by song:
fftbird = fft(song_bird)./fft(song);
then take the ifft. No promises, but it could work! A similar approach using the spectrogram function output might also be a possibility.

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!