資源簡介
通過Matlab仿真 消除歌曲中人聲 效果較為理想

代碼片段和文件信息
clear
clc
close?all
[Originalfsbits]=wavread(‘E:\Curriculum\The?Fifth?Term\數字信號處理\課程設計\DSP?Voice?Cuter\Love?Story.wav‘);%修改文件路徑可以濾除不同歌曲
%size(Original)
ts=1/fs;
N=length(Original)-1;
t=0:1/fs:N/fs;
Nfft=N;
df=fs/Nfft;
fk=(-Nfft/2:Nfft/2-1)*df;
a1=1a2=-1b1=1b2=-1;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SoundLeft=Original(:1);
SoundRight=Original(:2);
SoundLeft_f=ts*fftshift(fft(SoundLeftN));
SoundRight_f=ts*fftshift(fft(SoundRightN));
figure(1)
subplot(411)?
plot(tSoundLeft);
subplot(412)?
plot(tSoundRight);
subplot(413)?
f_range=[-3000300000.06];
plot(fkSoundLeft_f);
axis(f_range);
subplot(414)?
plot(fkSoundRight_f);
axis(f_range);
%?Sound=SoundLeft-SoundRight;
?
NewLeft=a1*SoundLeft+a2*SoundRight;
NewRight=b1*SoundLeft+b2*SoundRight;
Sound(:1)=NewLeft;
Sound(:2)=NewRight;
Sound_Left_f=ts*fftshift(fft(NewLeftN));
Sound_Right_f=ts*fftshift(fft(NewRightN));
figure(2)
subplot(411)
plot(tNewLeft);
subplot(412)
plot(tNewRight);
f_range=[-3000300000.06];
subplot(413)
plot(fkSound_Left_f);
axis(f_range);
subplot(414)
plot(fkSound_Right_f);
axis(f_range);
BP=fir1(300[5002000]/(fs/2));?????%?考慮300階
CutDown=filter(BP1Sound);?????%Pass?BPF
Sound_Final=Sound-0.6*abs(CutDown);
Sound_Final_f=ts*fftshift(fft(Sound_FinalN));
figure(3)
subplot(211)
plot(tSound_Final);
subplot(212)
f_range=[-3000300000.06];
plot(fkSound_Final_f);
axis(f_range);
sound(Sound_Finalfsbits);
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????6176828??2011-06-01?15:17??Rolling?in?the?Deep.wav
?????文件???????1644??2012-07-07?15:15??VoiceFilterB1.m
-----------?---------??----------?-----??----
??????????????6178472????????????????????2
評論
共有 條評論