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 moving average filter of the order*M=100*, i.e. the length of the impulse response should be*N1=101*samples. - Create the second sequence of the length
*N2=4000*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
*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%*). - 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*. **Checked result: (1 point)**- 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").
- 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 suppression of additive noise from the signal SA107S06_auto2.CS0 (sentence in car environment, fs = 16 kHz, raw data, 16-bit PCM) using the spectral subtraction and OLA with general window.
- The estimation of noise spectrum compute on the basis of averaging of spectrum in the beginning part of the signal without speech activity.
- After the subtraction of magnitude noise spectrum set the negative spectral components equal to 0 and use the phase of input noisy signal for the invers transform into the time domain.
**Checked result: (1 point)**- Display the magnitude spectrum of the first short-time frame of input signal.
- Display in the same figure the the estimated magnitude spectrum of background noise.
- Display waveforms and spectrograms of input and output signal after the spectral subtraction with partially suppressed noise.
- Check the level of noise suppression by illustrative listening of input and output signal.

- Further signals for possible processing:
*SA110992_auto1.CS0*- (word 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

HOMEWORK:

**Implementation of spectral thresholding**- 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.
- Result:
**BONUS of 2 points**(when**correct running MATLAB solution**is delivered till today,**Tu 19 Dec 2017, 23:59**)- 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.

**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.
- Result:
- Display waveforms and spectrograms of (noisy) input and (cleared) output signal.
- Compare input and output on the basis of informal listening.