Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

i need someone to write for me the code and the hamming window how it will be ca

ID: 2078952 • Letter: I

Question

i need someone to write for me the code and the hamming window how it will be calculate regarding to the code and i will apply it thank you

(a) Record your voice, it can be any single Arabic digit (b) Save it, listen it, and plot it (c) Using 20 milliseconds Hamming window, calculate spectrogram. Draw the spectrogram. (d) Add random noise to your voice at SNR 5 dB. First you calculate a factor k for the new signal n clean k noise for SNR 5 dB. hen use this formula to add the noise (e) Listen the noisy signal and plot it (f) Draw spectrogram sam e as (c) (g) Apply some filter to remove the noise. (h) Listen the filtered signal and plot it (i) Draw spectrogram same as (c).

Explanation / Answer

A. Record voice for speech at single arabic digit

B. Save it , listen it and plot it

% Plot the samples.
figure,plot(myRecording),title('Original Sound');
%Offset Elimination
a = myRecording;
a=double(a);
D = a-mean(a);
figure,plot(myRecording),title('Sound after Offset Elimination');

%normalizing
w = D/max(abs(D));
figure,plot(w),title('Normalized Sound');

%hamming window
a1=double(w);
%a1=a1';
N=length(w);
hmw = hamming(N);
temp = a1.*hmw;
a1 = temp;

C.

s = spectrogram(x)

s = spectrogram(x,window)

s = spectrogram(x,window,noverlap)

s = spectrogram(x,window,noverlap,nfft)

[s,w,t] = spectrogram(___)

[s,f,t] = spectrogram(___,fs)

[s,w,t] = spectrogram(x,window,noverlap,w)

[s,f,t] = spectrogram(x,window,noverlap,f,fs)

[___,ps] = spectrogram(___)

[___] = spectrogram(___,'reassigned')

[___,ps,fc,tc] = spectrogram(___)

[___] = spectrogram(___,freqrange)

[___] = spectrogram(___,spectrumtype)

[___] = spectrogram(___,'MinThreshold',thresh)

spectrogram(___)

s = spectrogram(x) returns the short-time Fourier transform of the input signal, x. Each column of s contains an estimate of the short-term, time-localized frequency content of x.

s = spectrogram(x,window) uses window to divide the signal into sections and perform windowing.

s = spectrogram(x,window,noverlap) uses noverlap samples of overlap between adjoining sections.

s = spectrogram(x,window,noverlap,nfft) uses nfft sampling points to calculate the discrete Fourier transform.

[s,w,t] = spectrogram(___) returns a vector of normalized frequencies, w, and a vector of time instants, t, at which the spectrogram is computed. This syntax can include any combination of input arguments from previous syntaxes.

[s,f,t] = spectrogram(___,fs) returns a vector of cyclical frequencies, f, expressed in terms of the sample rate, fs.

[s,w,t] = spectrogram(x,window,noverlap,w) returns the spectrogram at the normalized frequencies specified in w.

[s,f,t] = spectrogram(x,window,noverlap,f,fs) returns the spectrogram at the cyclical frequencies specified in f.

[___,ps] = spectrogram(___) also returns a matrix, ps, containing an estimate of the power spectral density (PSD) or the power spectrum of each section.

[___] = spectrogram(___,'reassigned') reassigns each PSD or power spectrum estimate to the location of its center of energy. If your signal contains well-localized temporal or spectral components, then this option generates a sharper spectrogram.

[___,ps,fc,tc] = spectrogram(___) also returns two matrices, fc and tc, containing the frequency and time of the center of energy of each PSD or power spectrum estimate.

[___] = spectrogram(___,freqrange) returns the PSD or power spectrum estimate over the frequency range specified by freqrange. Valid options for freqrange are 'onesided', 'twosided', and 'centered'.

[___] = spectrogram(___,spectrumtype) returns PSD estimates if spectrumtype is specified as 'psd' and returns power spectrum estimates if spectrumtypeis specified as 'power'.

[___] = spectrogram(___,'MinThreshold',thresh) sets to zero those elements of ps such that 10 log10(ps) thresh. Specify thresh in decibels.

spectrogram(___) with no output arguments plots the spectrogram in the current figure window.

spectrogram(___,freqloc) specifies the axis on which to plot the frequency

D.

%Fast Fourier Transform a2=double(a1); N=length(a1); n=ceil(log2(N)); nz=2^n; fs = 96000; x_z=0*[1:nz]; x_z(1:N)=a2; X=fft(x_z); x1=abs(X); wq=double(0:nz-1)*(fs/nz); figure,stem(wq,x1),title('Spectrum'); xlabel('Frequency (Hz)'); ylabel('Magnitude of FFT Coefficients'); nz1=round(nz/2) x2=x1(1:nz1); w1=wq(1:nz1); figure,plot(w1,x2); title('Half Length Spectrum of Sound'); nz2=nz1*10;

% Plot the samples.
figure,plot(myRecording),title('Original Sound');
%Offset Elimination
a = myRecording;
a=double(a);
D = a-mean(a);
figure,plot(myRecording),title('Sound after Offset Elimination');