Remove unwanted narrowband interference
9 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/243224/image.jpeg)
1 comentario
Daniel M
el 17 de Oct. de 2019
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?)
Respuestas (1)
Kaashyap Pappu
el 22 de Oct. de 2019
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!
0 comentarios
Ver también
Categorías
Más información sobre Audio I/O and Waveform Generation en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!