Trying to remove vocals from songs (create karaoke) Specifically, windowing and framing help.
134 views (last 30 days)
Show older comments
I have been trying to accoplish this for a little while now, but I am no expert in MATLAB (far from it). I came across a code in a forum that one guy used, but it doesn't work well at all. Thus, why he was asking for help in the forum. The advice that he was given was to: "What this means is that you have to break up your signal in frames in the time-domain and do your fft and masking separately for each frame. Also you should consider to use an overlap in your time-domain framing." and "In addition to all of the points above, Windowing is also required to minimise bleed between adjacent bins of strong frequencies." He later posted that he tried those things, and it worked well. He never reposted his code, though. I am not sure what he did to fix it. Can anyone advise me on how to do those things. Here is the code:
[y, fs] = wavread('Song.wav');
left = y(:,1);
right = y(:,2);
fftL = fft(left);
fftR = fft(right);
for i = 1:683550 %in my example 683550
dif = fftL(i,1) / fftR(i,1);
dif = abs(dif);
if (dif > 0.7 & dif < 1.5)
fftL(i,1) = 0;
fftR(i,1) = 0;
end;
end;
leftOut = ifft(fftL);
rightOut = ifft(fftR);
yOut(:,1) = leftOut;
yOut(:,2) = rightOut;
wavwrite(yOut, fs, 'tmp.wav');
Thank you
6 Comments
keshav poojari
on 29 Dec 2018
[y,fs]=audioread(audiofile);
left=y(:,1);
right=y(:,2);
sound(left-right ,fs);
I used above code.. But This code not removed vocals completly.. What can i do?
Image Analyst
on 29 Dec 2018
Of course not, like I said in my Answer below. I know it's not easy but you should at least TRY ICA/BSS (what I referred you to below in my Answer below) since it has a good chance of working while what you tried already is guaranteed not to work, as you already know.
Answers (1)
See Also
Categories
Find more on AI for Audio in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!