Docsity

Speech Analysis Techniques: Acoustic Representation and Extraction, Lecture notes of Digital Signal Processing

Partial preview of the text

Download Speech Analysis Techniques: Acoustic Representation and Extraction and more Lecture notes Digital Signal Processing in PDF only on Docsity!

Speech Analysis Techniques

Notes This section deals with the types of acoustic analyses that are used to (a) reduce the amount of raw speech data to manageable quantities, and (b) extract information from the raw signal which better represents all and only the acoustic properties that are crucial in interpreting the speech signal.

Why Bother?

• Perceptually motivated representation

  • Time signal not representative of perceptually

important information

• Data reduction

  • Remove unimportant or redundant information
  • Extract small number of features that capture

most salient aspects of signal.

NOTES

The question here is “why not use the sampled waveform as the representation of the acoustic speech signal for recognition.” There are two fundamental reasons, although they are not totally unrelated. First, since we know that humans do an excellent job of recognizing speech, it makes sense to use what we know about human auditory processing to inform our recognition models. The second reason for not using the raw sampled waveform is that we know there is a good bit of either irrelevant or redundant information in the raw signal. For instance, it is clear that the acoustic consequences of substantial anatomical differences among speakers are not particularly relevant to the perception of speech (though they are certainly important to the perception of speaker ). Thus processing that reduces the variance due to individual speaker differences should tend to simplify phonetic recognition.

Human sensory/perceptual

system as guide

• Auditory system performs a frequency

analysis of sound

  • basilar membrane
  • tonotopic organization in auditory cortex

• Logarithmic sensory response

• Phase is generally not represented

• Spectral & Temporal masking

• Spectral resolution

NOTES

The factors most frequently considered in modeling human perceptual processes for speech analysis/recognition are:

  1. We appear to do a frequency analysis of the signal.
  2. Sensory systems have generally compressive response properties (e.g., perceptual magnitudes are related approximately logarithmically to physical magnitudes for both loudness and pitch).
  3. Phase is not especially important.
  4. There are clear interactions in perception that involve both temporal and spectral domains. These are most easily seen in terms of masking effects where sound energy at one time/frequency masks our ability to detect sound energy at other times/frequencies.
  5. Many features that appear to be quite prominent in frequency analyses of speech are likely to be less so, or even completely imperceptible for human listeners due to our inability to resolve fine grained acoustic features that are closely spaced in the frequency domain. That is, sounds that are within one critical bandwidth of one another cannot be resolved as separate sounds.

Discrete Fourier Transform

/ Complex Transform / for (j=0; j<=npt; j++) { re[j] = 0; im[j] = 0; for (k=0; k<npt; k++) { re[j] += y[k] * cos(2PIkj/npt); im[j] += y[k] * sin(2PIkj/npt); } } /* Log Magnitude / for (j=0; j<=npt; j++) s[j] = 10 * log10(re[j]re[j]+im[j]im[j]);* NOTES Since humans do a frequency analysis of speech, let’s start by looking at how frequency analyses are done digitally. This is the Discrete Fourier Transform (DFT) assuming a real input sequence. This cost of computing the transform using this straight forward analysis technique increases with N^2 and as a result, it is rarely used. The Fast Fourier Transform (FFT) scales as N*LOG(N) and is almost universally used instead. The one drawback to the FFT is that (most) implementations require that N be a power of 2. In practice, this is rarely a serious drawback because the input array to the FFT can be padded with zeros out to the next power of 2. Following calculation of the complex DFT, the log magnitude of the spectrum is commonly calculated as in this example which expresses the magnitude in dB. The log magnitude spectrum of the vowel /i/ spoken by a male talker is shown in the next slide.

Cepstrum

/ Complex Transform / for (j=0; j<=npts; j++) { re[j] = 0; im[j] = 0; for (k=0; k<npts; k++) { re[j] += s[k] * cos(2PIkj/npt); im[j] += s[k] * sin(2PIkj/npt); } } /* Magnitude / for (j=0; j<=npts; j++) s[j] = sqrt(re[j]re[j]+im[j]im[j]);* NOTES An important analysis technique that is based on the Fourier transform is the cepstrum analysis. The Cepstrum is the Fourier transform of the log magnitude spectrum. This is, in effect, a time domain function since the Fourier transform of a function in the frequency domain is in the time domain. However, we refer to the domain as “Quefrency” in this case. There is an important relationship between the operations involved in computing the cepstrum and the source-filter model of speech production. According to the source-filter model, a source function--expressed in the time domain--is convolved with the impulse response of a filter that describes the contribution of the vocal tract to the speech signal. In the frequency domain, the spectrum of the source is multiplied by the spectrum of the filter. However, if the spectra are expressed as log magnitudes, the process is additive, that is, the speech spectrum is the sum or superposition of the source and filter spectra. By estimating one of the two functions (source or filter) that were summed to form the speech spectrum and subtracting it from the speech spectrum, it is possible to estimate the other function. In effect, this is a method for separating or deconvolving the source and filter components. The next figure shows the Cepstrum derived from the Spectrum shown in the previous figure.

Cepstrum

0 200 400 600 800 1000 1200 1400 8000.0 470.6 242.4 163.3 123.1 98.8 82.5 70. Quefrency (Hz) Am plitude (dB) NOTES The Quefrency axis is shown in units of Hz to make it easier to estimate F0 from the data. In reality, the Quenfrency axis is in units of time, or more specifically lag time. The magnitude of term at the origin (labeled 8000 in this graph) is proportional to the degree of association between adjacent samples of the speech waveform (lag time = 1). The second coefficient in the cepstrum is related to the degree of association between samples separated from one another by a sample (lag time = 2), and so forth. Thus, this cepstrum shows that coefficients associated with short lag times are generally strongest, but that there are also two distinct peaks at long lag times. These peaks are at lag times associated with components of about 100 Hz and about 75 Hz. The strongest of these two peaks, at just over 100 Hz reflects the speakers F0. This is consistent with the harmonic structure of the original log magnitude spectrum.

Cepstrum Smoothed Spectrum

0 20 40 60 80 100 120 0 1000 2000 3000 4000 5000 6000 7000 Frequency (Hz) Amplitude (dB) NOTES This cepstrally smoothed spectrum was generated by first pruning all terms from the cepstrum that were associated with spectral features finer than about 250 Hz resolution. As a consequence, all the harmonic structure of the original log magnitude spectrum has been eliminated. However, spectral features presumable related to the vocal tract filter function such as formant frequency locations have been retained. Comparing this figure with the original spectrum, all the features noted there are present here, and several are much easier to see.

Linear Predictive Coding (LPC)

• Widely used in speech since about 1970.

• Formulation actually derives an inverse

filter such that convolving the filter with the

speech signal leaves the residual error

signal.

where ( ) ( ) ˆ( )

0

en sn s n

asn i

e n i

M i

= Find ai to minimize e(n) NOTES LPC has been used in areas other than speech since about mid 20th century. Speech applications first appeared in mid 60’s & reached widespread use by early 70’s. It is a fast efficient technique for estimating the vocal tract transfer function (VTF) from the acoustic speech signal. The filter that is calculated for LPC is an inverse filter, that is, it is designed to take the acoustic speech signal as input and produce a signal with a flat spectrum as output. This output error or residual signal contains any information from the original speech signal that is not captured by the filter.