Remove unwanted narrowband interference

13 次查看(过去 30 天)
I have this corrupted audio with the sound of a human lung, and would need to remove its interference.
I have attempted both high pass filter and passband filter, would appreciate if someone can help take a look at my code, and see where I should edit to get a clearer sound.
Corrupted Audio:
https://drive.google.com/file/d/15xrvx8pynmhCd86MY-1Zfc7EmDMv-MwP/view?usp=sharing
My current code:
[y,fs]=audioread('lungaudio.wav'); %y=samples, fs = sampling frequency
Ts=1/fs; %Sampling period
nfft=length(y);
nfft2=2^nextpow2(nfft);
ff=fft(y,nfft2);
fff=ff(1:nfft2/2);
plot(abs(fff));
xfft=fs*(0:nfft2/2-1)/nfft2;
plot(xfft,abs(fff));
xlabel('Frequency/Hz');
ylabel('Normalized Amplitude');
title('Frequency Domain Signal');
fc=550;
[b,a]=butter(6,fc/(fs/2), 'high'); %lowpass filter to only get 60hz
y_filtered=filter(b,a,y);
plot(y_filtered)
% sound(y_filtered,fs);
Graph Obtained:
  1 个评论
Daniel M
Daniel M 2019-10-17
I think you mean to use 'low' in your call to butter.
See this recent question also regarding audio of a lung (perhaps a classmate?)

请先登录,再进行评论。

回答(1 个)

Kaashyap Pappu
Kaashyap Pappu 2019-10-22
Increasing the order of the Butterworth filter could help improve the response. Alternatively, the buttord function can be used to get the optimal order and cutoff frequency values to give to the “butter” function.
Hope this helps!

类别

Help CenterFile Exchange 中查找有关 Audio I/O and Waveform Generation 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by