здесь У меня есть звуковые сигналы: один - это речевой сигнал, а другой - шумовой сигнал, я добавил их вместе - назовите его сигналом «mix» - и теперь я ' m попросил отфильтровать его, чтобы шум был удален, а остальное - только мужской речевой сигнал. Проанализировав графики мужской речи и шума во временной и частотной областиИдеальный фильтр Low Pass, реализующий использование matlab 2014a
Time Domain1: https://www.dropbox.com/s/m5frew6f0qlbae5/filteres%20signal.jpg?dl=0
Frequency Domain
Я наблюдал что max freq of male speech - это немного меньше, чем минимальная частота шума, поэтому я сделал фильтр нижних частот - используя функцию прямой - и фильтрую его в частотной области.
Идеально Фильтр низких частот
я график полученный сигнал в частотной и временной области, график в частотной области так же, как мужская речь граф в частотной области, но во время домен это не совсем то же самое
отфильтрованный сигнал
, и я заметил изменение, когда я озвучил приведенный сигнал. Любая помощь, пожалуйста, узнайте, почему отфильтрованный сигнал не совсем соответствует оригинальной мужской речи?
* P.S: Я знаю, что фильтрация таким образом недостаточна, но в настоящее время именно так мы должны делать это в нашем отчете в моем курсе.
Вот мой код:
[voice,Fs] = audioread ('hamid1.wav');
[noise,Fs] = audioread ('noise.wav');
voice(55126: 131072)=0 % to add both voice and noise signal together their dimensio must agree
mix = voice + noise; % the mixed signal
%vp = audioplayer(voice,Fs);
%play(vp);
%-- data for plotting voice --%
iFs = 1/Fs;
voiceLen = length(voice);
voiceF0 = 1/(iFs*voiceLen);
f_voice = 0:voiceF0: (voiceLen-1)*voiceF0;
t_voice = 0:iFs:(voiceLen-1)*iFs;
mag_voice = abs(fft(voice));
%-- data for plotting noise --%
noiseLen = length(noise);
noiseF0 = 1/(iFs*noiseLen);
f_noise = 0:noiseF0: (noiseLen-1)*noiseF0;
t_noise = 0:iFs:(noiseLen-1)/Fs;
mag_noise = abs(fft(noise));
%--------------------------------------------%
%-- data for plotting mix --%
mixLen = length(mix);
mixF0 = 1/(iFs*mixLen);
f_mix= 0:mixF0: (mixLen-1)*mixF0;
t_mix = 0:iFs:(mixLen-1)/Fs;
mag_mix = abs(fft(mix));
%-- plotting voice speech, noise and mix in frequency domain --%
figure(1);
subplot(3,1,1);
plot(f_voice,mag_voice);
title('voice speech in frequency domain');
xlabel('frequency'); ylabel('Magnitude');
subplot(3,1,2);
plot(f_noise,mag_noise);
title('noise in frequency domain');
xlabel('frequency'); ylabel('Magnitude');
subplot(3,1,3);
plot(f_mix,mag_mix);
title('mix signal in frequency domain');
xlabel('frequency'); ylabel('Magnitude')
%-- plotting voice speech, noise and mix in time domain --%
figure(2);
subplot(3,1,1);
plot(t_voice,voice);
title('voice speech in time domain');
xlabel('time'); ylabel('Amplitude');
subplot(3,1,2);
plot(t_noise,noise);
title('noise in time domain');
xlabel('time'); ylabel('Amplitude');
subplot(3,1,3);
plot(t_mix, mix);
title('mix signal in time domain');
xlabel('time'); ylabel('Amplitude')
%-- design the bandpass filter --
rect = 1*(f_mix>=0 & f_mix <3000);
rect2= rect+0*(f_mix>=3000 & f_mix <5482);
%-- plotting the ideal filter --%
figure(3)
plot(f_mix, rect2,'linewidth',2);
title('bandpass ideal filter');
xlabel('frequency'); ylabel('Magnitude')
axis([0 11000 0 1.5])
%-- Filtering the mix signal to extract voice speech without noise --%
filtered = rect2.*mag_mix'
filteredT = ifft(filtered)
figure(4)
subplot(2,1,1)
plot(f_mix, filtered)
title('Filtered signal in frequency domain')
xlabel('frequency')
ylabel('Magnitude')
subplot(2,1,2)
plot(t_mix, real(filteredT))
title('Filtered signal in time domain')
xlabel('time')
ylabel('Amplitude')
%-------------------------------------------%
filtSig = audioplayer(filteredT,Fs)
play(filtSig)
Фотографии не отображаются. Вероятно, лучше всего проверить гиперссылки. – am304
@ am304 Я добавил ссылки на фото, а также надеюсь, что он покажет – AMH9
Вот сообщение, когда я клик по ссылкам: «Ошибка (403). Кажется, вы здесь не здесь! Посетите наш Справочный центр и форумы о помощи или вернитесь домой ». – am304