Technique OverLap-and-Add (OLA) with general window

**Tasks to do: **

**OLA with general window - basic implementation of the algorithm**- Create the impulse response
*h[n]*of the length*N=100*samples representing the exponential averaging filter which is described by the formula*h[n] = 0.02 * 0.98^n*. - Create the second sequence of the length
*N2=6000*which represents the input signal*x[n]*containing the addition of sinusoid with zeros phase shift and parameters*A = 1, f = 12 Hz, fs = 8000 Hz*and white noise with normal distribution, mean value 0 and variance equal to 1. - Realize the suppression of white noise on the basis of the linear
convolution (fcn
*conv*) using the above mentioned filter and display- subplot(311) - created impulse response
*h[n]*of MA filter (stem), - subplot(312) - generated input signal
*x[n]*(plot), - subplot(313) - filtered output signal
*y[n]*, i.e. the result of linear convolution of signals*x[n]*and*h[n]*(plot).

- subplot(311) - created impulse response
- Realize the filtering on the basis of cyclic convolution using the processing in particular short-time frames of the length
*NDFT = 512*samples using the segmentation without overlap and compare the results of cyclic and linear convolution implementation. *NOTE. These point were solved last week within checked results No. 1 and 2.***Realize the technique OverLap-and-Add (OLA) with general window**for the filtering of long signals in frequency domain. Parameters and particular steps of the algorithm should be as follows:*wlen=512*- frame length,*wstep=wlen/2*- segmentation step (or frame overlap -*overlap*),*wtype*- type of weighting window - Hann- Computation of a number of processed frames for finite-length signal -
*wnum* - creation of zeroth output singal with the length equivalent to the input one
- Main cycle for the processing of i-th frame (selection, modification of psektrum, addition to the output sequence)
- Correction of amplification of output signal -
*wnorm*

- Try the technique for various weighting windows (also
*Hamming, Blackman, rectangulat*) and various levels of an overlap (*25%, 50%, 75%*). - 1st checked result:
- Display and compare the output signals computed on the basis of linear convolution in the time domain and frequency-domain convolution using the
*OLA with general window*for the case of*Hamming window and 75% overlap*.

- Display and compare the output signals computed on the basis of linear convolution in the time domain and frequency-domain convolution using the

- Create the impulse response
**Band filtering in the frequency domain**- Realize a frequency-domain filtering of 16 kHz full-band signal into telephone band using the above mentioned technique
*OLA with general window*with Hamming window and 75% overlap.*The short-time frame length should be 32 ms*. - Realize the filtering by the application of DFT-spectrum mask which zeros the frequency
components of complex spectrum which are outside of the band
*300 Hz <= f <= 3400 Hz*. - 2nd checked result:
- Display created mask of used filter (in fact ideal frequency response).
- Display waveform and spectrogram of the input signal
*SA107S06.CS0*(fs = 16 kHz, raw format, 16-bit PCM, signal can be loaded using loadbin.m, the length of short-time frame for the spectrogram computation should be 32 ms). - Display waveform and spectrogram of the output signal limited to the telephone band.
- Compare input and output signals also on the basis of informal listening.

*Repeat for the overlap 50%*and check the quality of output signal on the basis of informal listening.*Repeat using the rectangular weighting window*and check the effect of discontinuities at frame boudaries in output signal on the basis of informal listening.*Repeat also for other windows and other levels of overlap*and check the quality of output signal on the basis of informal listening.- Repeat for speech signals sampled by various sampling rates (saved in the file speech_8_16_44.mat - binary MATLAB format, it contains 3 signals saved in variables sig8, sig16 and sig44. To load the date use the command "load speech_8_16_44.mat").
- 3rd checked result:
- Display and compare waveforms and spectrograms of input and output
signal
*sig44*which is sampled by*fs = 44.1 kHz*.

- Display and compare waveforms and spectrograms of input and output
signal

- Realize a frequency-domain filtering of 16 kHz full-band signal into telephone band using the above mentioned technique
**Implementation of spectral subtraction**- Realize the suppresion of additive noise from the first task using the spectral subtraction and OLA with general window.
- The estimation of white noise spectrum compute on the basis of average of spectral components in upper half of frequncy band.
- After the subtraction of magnitude noise spectrum use the phase of the input signal for the invers transform into the time domain.
- 4th checked result:
- Display the magnitude spectrum of the first short-time frame of input signal.
- Display in the same figure the level related to the magnitude spectrum of white noise.
- Display waveforms of input and output signal after the spectral subtraction with partially suppressed noise.

HOMEWORK:

**Cancelation of additive noise in recorded speech signal**- Record your own utterance with a noisy additive background using the sampling frequency 16 kHz. Keep approximately one-second pause in the utterance beginning and estimate the noise spectrum by an averaging of short-time frames from the initial part of the utterance without speech activity. Realize the spectral subtraction using particular steps described above.
- BONUS (1 point):
- Display waveforms and spectrograms of (noisy) input and (cleared) output signal.
- Compare input and output on the basis of informal listening.

- Further signals for possible processing:
*SA110992_auto1.CS0*- (word in car environment) fs = 16 kHz, raw data, 16-bit PCM*SA107S06_auto2.CS0*- (sentence in car environment) fs = 16 kHz, raw data, 16-bit PCM*ma034014_auto3.ils*- (sentence in standing car) fs = 16 kHz, raw data, 16-bit PCM