Question

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

Answer #1

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!

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...

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 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;...

Problem 1 ...... you can use Matlan i got one so all
what i need is 2, 3 and 4 one of them or all of them ..
thanks
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...

ADVERTISEMENT

Get Answers For Free

Most questions answered within 1 hours.

ADVERTISEMENT

asked 2 minutes ago

asked 6 minutes ago

asked 10 minutes ago

asked 13 minutes ago

asked 20 minutes ago

asked 23 minutes ago

asked 24 minutes ago

asked 34 minutes ago

asked 34 minutes ago

asked 37 minutes ago

asked 45 minutes ago

asked 57 minutes ago