How to filtre an audio signal with low-pass filtre

145 visualizzazioni (ultimi 30 giorni)
Hey guy, I'm new on Matlab and I have no idea how can I do a low pass filtre to filtre my signal.
Here is my signal and I don't know how to remove that hight frequency from backgrond and to keep just that voice.
I would like to know the easier way to do this.
I was doing some research on google and I so a lot of complicate options, and some options with butter or filter or.. to use fdatool and so on... But I could not understand how to use them no matter how much we read about this.
And please don't give me some links from some sites or other matlab questions like an answer, I've alread read everything for nothing...
This is the why how I read and playback the sound after I've try some filtres.
[Y, Fs] = audioread('semnale_audio/semnal1.wav');
%filtred my signal some how...
player = audioplayer(fitlered_signal, Fs);
play(player);
So please guys, if someone could explain me how can I do this I would be very glad.

Risposta accettata

Star Strider
Star Strider il 18 Dic 2016
I cannot access your dropbox file. It would be much easier for us for you to use the ‘paperclip’ icon and upload it here instead.
Even in the absence of your file, it is easy to design your filter. Human voice frequencies are in the range of about 100 Hz to 6000 Hz, so a Chebyshev Type II filter to pass voice frequencies would be:
Fs = 44100; % Sampling Frequency (Change If Different)
Fn = Fs/2; % Nyquist Frequency
Wp = [150 5800]/Fn; % Normalised Passband
Ws = [ 50 6100]/Fn; % Normalised Stopband
Rp = 1; % Passband Ripple (dB)
Rs = 30; % Stopband Ripple (dB)
[n,Ws] = cheb2ord(Wp,Ws,Rp,Rs); % Chebyshev Type II Order
[b,a] = cheby2(n,Rs,Ws); % IIR Filter Coefficients
[SOS,G] = tf2sos(b,a); % Convert To Second-Order-Section For Stability
figure(1)
freqz(SOS, 4096, Fs) % Check Filter Performance
filt_sig = filtfilt(SOS,G, Your_Signal);
Change the appropriate passband and stopband frequencies depending on the frequency content of your signal.
  11 Commenti
Vincent Abraham
Vincent Abraham il 25 Ott 2020
Could you explain how u selected the values for Wp, Ws, Rp, Rs?
Star Strider
Star Strider il 25 Ott 2020
Vincent Abraham — This was a while ago, so since the signal was provided, I likely downloaded it and did a fft on it. On the basis of the fft results, I chose ‘Wp’, and from those, acceptable values for ‘Ws’. The ‘Rp’ and ‘Rs’ values can be anything reasonable. (These days, I’d use an elliptic filter for efficiency.)

Accedi per commentare.

Più risposte (1)

Image Analyst
Image Analyst il 18 Dic 2016
Did you try to apply the example in butter() to your code (like I did below):
% Read standard sample tune that ships with MATLAB.
[dataIn, Fs] = audioread('guitartune.wav');
% Filter the signal
fc = 800; % Make higher to hear higher frequencies.
% Design a Butterworth filter.
[b, a] = butter(6,fc/(Fs/2));
freqz(b,a)
% Apply the Butterworth filter.
filteredSignal = filter(b, a, dataIn);
% Play the sound.
player = audioplayer(filteredSignal, Fs);
play(player);
It works, and it seems easy enough. What happened when you tried it? Did you get an error or something?
  5 Commenti
Image Analyst
Image Analyst il 18 Dic 2016
Star said he couldn't get it and when I try to play the sound from either of those two web sites you listed they say it's not a good sound file, so I suspect it's corrupt. Please post a good copy with the paperclip icon.

Accedi per commentare.

Categorie

Scopri di più su Audio Processing Algorithm Design in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by