matlab wav格式音频去除人声
luoyvhushi:
从97行开始的代码在命令窗口行运行就可以了
代码如下:[x,fs]=audioread('只因你太美.wav'); x1=x(:,1); % 抽取第 1 声道
x2=x(:,2); % 抽取第 2 声道
NewLeft=x1-x2;
NewRight=x1-x2;New=NewLeft+NewRight;BandstopNew=filter(Hbs,New);plot(BandstopNew);
>> [x,fs]=audioread('只因你太美.wav'); x1=x(:,1); % 抽取第 1 声道
x2=x(:,2); % 抽取第 2 声道
NewLeft=x1-x2;
NewRight=x1-x2;New=NewLeft+NewRight;BandstopNew=filter(Hbs,New);n=length(BandstopNew); %滤去人声一般80hz到700hz之后,其时域频域(在Hbs中可以自己改)
BANDSTOPNEW=fft(BandstopNew,n);
figure(4);
subplot(2,1,1)
plot(BandstopNew);
title('滤去人声一般80hz到700hz之后信号波形')
xlabel('时间');
ylabel('幅度');
grid on;
subplot(2,1,2)
plot(abs(fftshift(BANDSTOPNEW)));
xlabel('频率');
ylabel('幅度');
title('声道相减后信号频谱');
grid on;
sound(BandstopNew,fs)
一次性输完按Enter等一会儿图绘出来了
|