In this project it is desired to perform frequency analysis on the two speech recordings. Specifically, it is required to compute and display the spectrum of one segment of each of your two signals. Record ourself by saying `yes' and `no' and create a wav files. The recordings should be at 8000 samples per second.Using MATLAB. Extract a 50 millisecond segment of voiced speech from your `yes'signal. You should select the segment during the `e' sound of `yes'.The segment should be roughly periodic.Compute and display the spectrum (DTFT) of your 50 millisecond speech segment.

Repeat same for your `no' signal.Based on the spectra that you compute what is the pitch frequency of your speech? (The pitch frequency is the fundamental frequency of the quasi-periodic voiced speech signal.). Plot the pole-zero diagram of your filter in Matlab. Verify that the poles and zero match where they were designed to be. Plot the frequency response magnitude of your filter |[Hf]| versus physical frequency. Plot the impulse response h[n]of your filter. You can create an impulse signal and then use the Matlab command filter to apply your filter to the impulse signal.

Apply your filter to your speech signal Extract a short segment of your speech signal before and after filtering. Plot both the original speech waveform x[n]and filtered speech waveform y[n]. Also plot the difference between these two waveforms d[n] = y(n) -x[n].

Click Here To Download Complete Project And Source Code

CHAPTER 1:

INTRODUCTION

Basic Theory: Speech is an acoustic signal produced from a speech production system. From our understanding of signals and systems, the system characteristics depend on the design of the system. For the case of linear time invariant system, this is completely characterized in terms of its impulse response. However, the nature of response depends on the type of input excitation to the system. For instance, we have impulse response, step response, sinusoidal response and so on for a given system. Each of these output responses are used to understand the behavior of the system under different conditions. A similar phenomenon happens in the production of speech also. Based on the input excitation phenomenon, the speech production can be broadly categorized into three activities. The first case where the input excitation is nearly periodic in nature, the second case where the input excitation is random noise-like in nature and third case where there is no excitation to the system.

NOTCH FILTER:

• A notch filter is used to eliminate a specific frequency from a given signal

TYPES OF NOTCH FILTERS:

FILTERS are mainly of two types in notches

1) IIR notch filter (INFINITE IMPULSE RESPONSE NOTCH FILTER)

2) FIR notch filter (FINITE IMPULSE RESPONSE NOTCH FILTER)

Elimination of pre-dominant frequency in speech signal 3

KLUNIVERSITY DEPARTMENT OF ELECTRONICS AND COMMUNICTION ENGINEERING

In this project we are using both IIR notch filters IIR NOTCH FILTER:

• It is a filter that depends upon the present and past outputs and present input • The general equation of an IIR filter can be expressed as follows:

ak and bk are the filter coefficients.

There are 8 main tasks in our project

Task1: Record yourself saying `yes' and `no' and create a wav files. The recordings should be at 8000 samples per second.Using MATLAB, you can form one vector of 4000 samples (half second)for the `yes'. You should form a second vector also of 4000 samples of the`no'. Plot the two speech signals

Task2: Extract a 50 millisecond segment of voiced speech from your `yes'signal. You should select the segment during the `e' sound of `yes'.The segment should be roughly periodic.Compute and display the spectrum (DTFT) of your 50 millisecondspeech segment. The frequency units should be in Hertz and should be computed according the sampling rate (8000 samples/second).Plot the spectrum on a linear scale and on a log scale. (For the logscale, use 20log10( |Xf|)).Based on your spectrum, what is the fundamental frequency present?Can you recognize the harmonics in the spectrum?

Task3: It can be observed that the spectrum of a short segment of speech signal contains roughly equally-spaced peaks. Now it is desired to eliminate one of the prominent peaks.Select the frequency (in cycles/second) of the peak to be eliminated from the spectrum computed. Design a second order digital notch filter using the following transfer function

Elimination of pre-dominant frequency in speech signal 4

KLUNIVERSITY DEPARTMENT OF ELECTRONICS AND COMMUNICTION ENGINEERING

that has zeros at the selected frequencies and corresponding poles. The zeros should be 2jfne and the poles should be where ‘r’ is slightly less than 1, and fn is normalized frequency (cycles/sample);this should be a number between zero and one half.Verify different values of ‘r’.

Task4: Repeat Task2 for your `no' signal.Based on the spectra that you compute, what is the pitch frequency of your speech? (The pitch frequency is the fundamental frequency of the quasi-periodic voiced speech signal.)

Task5: Plot the pole-zero diagram of your filter (use the Matlab command zplane) in Matlab. Verify that the poles and zero match where they were designed to be.

Task6: Plot the frequency response magnitude of your filter |[Hf]| versus physical frequency (the frequency axis should go from zero to half thesampling frequency). You can use the Matlab command freqz tocompute the frequency response. Verify that the frequency responsehas a null at the intended frequency.

Task7: Plot the impulse response h[n]of your filter. You can create an impulse signal and then use the Matlab command filter to apply yourfilter to the impulse signal.

Task8: Apply your filter to your speech signal (use Matlab command filter). Extracta short segment of your speech signal before and after filtering. Plot both the original speech waveform x[n]and filtered speech waveform y[n](you might try to plot them on the same axis). Also plot the difference between these two waveforms d[n] = y(n) -x[n]

What do you expect the signal d[n]to look like?

For the short segment you extract from the original and filtered speech waveforms, compute and plot the spectrum. Were you able to eliminate the spectral peak that you intended to?

Repeat same for your `no' signal.Based on the spectra that you compute what is the pitch frequency of your speech? (The pitch frequency is the fundamental frequency of the quasi-periodic voiced speech signal.). Plot the pole-zero diagram of your filter in Matlab. Verify that the poles and zero match where they were designed to be. Plot the frequency response magnitude of your filter |[Hf]| versus physical frequency. Plot the impulse response h[n]of your filter. You can create an impulse signal and then use the Matlab command filter to apply your filter to the impulse signal.

Apply your filter to your speech signal Extract a short segment of your speech signal before and after filtering. Plot both the original speech waveform x[n]and filtered speech waveform y[n]. Also plot the difference between these two waveforms d[n] = y(n) -x[n].

Click Here To Download Complete Project And Source Code

CHAPTER 1:

INTRODUCTION

Basic Theory: Speech is an acoustic signal produced from a speech production system. From our understanding of signals and systems, the system characteristics depend on the design of the system. For the case of linear time invariant system, this is completely characterized in terms of its impulse response. However, the nature of response depends on the type of input excitation to the system. For instance, we have impulse response, step response, sinusoidal response and so on for a given system. Each of these output responses are used to understand the behavior of the system under different conditions. A similar phenomenon happens in the production of speech also. Based on the input excitation phenomenon, the speech production can be broadly categorized into three activities. The first case where the input excitation is nearly periodic in nature, the second case where the input excitation is random noise-like in nature and third case where there is no excitation to the system.

NOTCH FILTER:

• A notch filter is used to eliminate a specific frequency from a given signal

TYPES OF NOTCH FILTERS:

FILTERS are mainly of two types in notches

1) IIR notch filter (INFINITE IMPULSE RESPONSE NOTCH FILTER)

2) FIR notch filter (FINITE IMPULSE RESPONSE NOTCH FILTER)

Elimination of pre-dominant frequency in speech signal 3

KLUNIVERSITY DEPARTMENT OF ELECTRONICS AND COMMUNICTION ENGINEERING

In this project we are using both IIR notch filters IIR NOTCH FILTER:

• It is a filter that depends upon the present and past outputs and present input • The general equation of an IIR filter can be expressed as follows:

ak and bk are the filter coefficients.

There are 8 main tasks in our project

Task1: Record yourself saying `yes' and `no' and create a wav files. The recordings should be at 8000 samples per second.Using MATLAB, you can form one vector of 4000 samples (half second)for the `yes'. You should form a second vector also of 4000 samples of the`no'. Plot the two speech signals

Task2: Extract a 50 millisecond segment of voiced speech from your `yes'signal. You should select the segment during the `e' sound of `yes'.The segment should be roughly periodic.Compute and display the spectrum (DTFT) of your 50 millisecondspeech segment. The frequency units should be in Hertz and should be computed according the sampling rate (8000 samples/second).Plot the spectrum on a linear scale and on a log scale. (For the logscale, use 20log10( |Xf|)).Based on your spectrum, what is the fundamental frequency present?Can you recognize the harmonics in the spectrum?

Task3: It can be observed that the spectrum of a short segment of speech signal contains roughly equally-spaced peaks. Now it is desired to eliminate one of the prominent peaks.Select the frequency (in cycles/second) of the peak to be eliminated from the spectrum computed. Design a second order digital notch filter using the following transfer function

Elimination of pre-dominant frequency in speech signal 4

KLUNIVERSITY DEPARTMENT OF ELECTRONICS AND COMMUNICTION ENGINEERING

that has zeros at the selected frequencies and corresponding poles. The zeros should be 2jfne and the poles should be where ‘r’ is slightly less than 1, and fn is normalized frequency (cycles/sample);this should be a number between zero and one half.Verify different values of ‘r’.

Task4: Repeat Task2 for your `no' signal.Based on the spectra that you compute, what is the pitch frequency of your speech? (The pitch frequency is the fundamental frequency of the quasi-periodic voiced speech signal.)

Task5: Plot the pole-zero diagram of your filter (use the Matlab command zplane) in Matlab. Verify that the poles and zero match where they were designed to be.

Task6: Plot the frequency response magnitude of your filter |[Hf]| versus physical frequency (the frequency axis should go from zero to half thesampling frequency). You can use the Matlab command freqz tocompute the frequency response. Verify that the frequency responsehas a null at the intended frequency.

Task7: Plot the impulse response h[n]of your filter. You can create an impulse signal and then use the Matlab command filter to apply yourfilter to the impulse signal.

Task8: Apply your filter to your speech signal (use Matlab command filter). Extracta short segment of your speech signal before and after filtering. Plot both the original speech waveform x[n]and filtered speech waveform y[n](you might try to plot them on the same axis). Also plot the difference between these two waveforms d[n] = y(n) -x[n]

What do you expect the signal d[n]to look like?

For the short segment you extract from the original and filtered speech waveforms, compute and plot the spectrum. Were you able to eliminate the spectral peak that you intended to?

## No comments:

## Post a Comment