Question

MATLAB FIR filter design. The audio file, covering the frequency range of roughly 0 to 3000...

MATLAB FIR filter design.

The audio file, covering the frequency range of roughly 0 to 3000 Hz, is very badly corrupted with high?level noise. Your problem is to design a digital filter that will sufficiently attenuate the noise so that the audio speech is intelligible. (sorry but chegg doesn't allow me to attach the wav file)

Here is the design template:

clear, clc      % clear all variables

%%  Read in the noisy audio signal from the file 'CapnJ.wav' using audioread function
[Signal_Noisy, Fs] = audioread('CapnJ.wav');
Signal_Noisy = Signal_Noisy'; % Change to column vector
N = length(Signal_Noisy);
Index = 0:N-1;

%%  Play the noisy audio signal using sound function
sound(Signal_Noisy, Fs), % Play the "Noisy" audio signal

%% Plot the time-domain noisy signal 
figure(1), clf
subplot(2,1,1)
plot(Index, Signal_Noisy)
ylabel('Orig. Time Sig. Amp.'),
xlabel('Time (Samples)'),
grid on, zoom on

%% Obtain and plot the DTFT magnitude of the noisy signal 
% You can use FFT with a very large number of points
% Plot the normalized magnitude in dB (i.e., 20*log10(mag/max(mag))
% Use Hz for the horizontal frequency axis (based on Fs sampling rate
% obtained above)
% Use proper axis limits for your plot



%%  Using fir1 function, design a lowpass FIR filter
% You need to select your filter order as well as the desired cut-off
% frequency. 
% For cut-off, try a few values in 2-4KHz range.
% Play with both cut-off and the filter order till you can properly hear and understand the spoken words.  
% Remember that the cut-off frequency input to fir1 is 0<Wn<1 with 1
% corresponding to the Nyquist rate (i.e., Fs/2 Hz or pi rad/sample)
F_cutoff = []; % Lowpass filter cutoff freq in Hz
B = fir1([],[]); % Simple lowpass FIR coeffs


%% Obtain and plot the filter normalized mag response
% Again, you can use FFT with a large number of points





%%  Lowpass filter the "Signal_Noisy" using the filter function and the filter you designed above 




%% Obtain and plot the normalized DTFT mag of your filtered signal

                

%% Play the reduced-noise sound using the sound function

Homework Answers

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Matlab function that takes an audio file and filters it in the frequency domain through a...
Matlab function that takes an audio file and filters it in the frequency domain through a highpass and lowpass filter. I have to do this using the Matlab FFT function to transform into the frequency domain, filter it, then transform it back using the Matlab IFFT function. The process has to use the overlap-add method as well. I was hoping to get an idea of what I am meant to be doing here. Thanks for the help!
You are required to design an FIR digital filter for real-time extraction of a signal corrupted...
You are required to design an FIR digital filter for real-time extraction of a signal corrupted by noise. The signal information is in the 0 - 1500 Hz and 8000 -10000 Hz bands, while the noise has most of its energy in the 2000 Hz - 7000 Hz band. What kind of filter should you design for this application? A. Bandpass B. Lowpass C. Highpass D. Bandstop   For the same problem, what is the transition bandwidth parameter for designing a...
The following question has to be implemented using matlab programming and fdatool a. Extract samples of...
The following question has to be implemented using matlab programming and fdatool a. Extract samples of a music file of a suitable format (sample.mp3, made available on the moodle) providing a duration of 2 seconds playtime, add a colored noise centered around 4.5kHz to the extracted samples so that the SNR is -15 dB. b. Realize an FIR (hamming) and IIR lowpass filter of order 10 having a cutoff frequency of 3kHz respectively. (Obtain the sampling frequency value from the...
For this homework, you will be filtering noise from a sound recording. The assignment is broken...
For this homework, you will be filtering noise from a sound recording. The assignment is broken into simple steps you can follow. Please follow instructions carefully and remember that you will only upload one workspace (*.mat) file. Make sure to name the clean_speech variable correctly. 1) Download the Matlab workspace from the link provided in Canvas. Move the downloaded file to the same folder as your script to make things simpler. 2) Load the downloaded workspace into Matlab. You can...
Problem 1....... you can use Matlab The following Scilab code generates a 10-second “chirp” with discrete...
Problem 1....... you can use Matlab The following Scilab code generates a 10-second “chirp” with discrete frequencies ranging from 0 to 0.2 with a sampling frequency of 8 kHz. clear; Fs = 8000; Nbits = 16; tMax = 10; N = Fs*tMax+1; f = linspace(0.0,0.2,N); x = zeros(f); phi = 0; for n=0:N-1 x(n+1) = 0.8*sin(phi); phi = phi+2*%pi*f(n+1); end sound(x,Fs,Nbits); sleep(10000); //allows full sound to play Add code that calculates and plays y (n)=h(n)?x (n) where h(n) is the...
Problem 3 you can use Matlab and also i give u the Problem 1 code its...
Problem 3 you can use Matlab and also i give u the Problem 1 code its on Matlab Using the same initial code fragment as in Problem 1, add code that calculates and plays y (n)=h(n)?x (n) where h(n) is the impulse response of an IIR bandpass filter with band edge frequencies 750 Hz and 850 Hz and based on a 4th order Butterworth prototype. Name your program p3.sce this is the Problem 1 code and the solutin clear; clc;...
Design an active-RC low pass second order Butterworth filter for a cutoff frequency of 1 kHz,...
Design an active-RC low pass second order Butterworth filter for a cutoff frequency of 1 kHz, and a pass band gain of 2 V/V. Use a 741 Op Amp. If using Table I, use a capacitor value of 0.1 μF for C and C1, otherwise you may use any capacitors available in the lab. If applicable, make an excel worksheet showing the calculations required for the above design.  Choose appropriate real resistor values for the designed circuit and simulate this circuit...