lpc and horn noise detection

38
LINEAR PREDICTIVE CODING METHODS AND HORN NOISE DETECTION By P GOPIKRISHNA (12) EASHWAR JEEVAN(15) V V N PRANATHI(30)

Transcript of lpc and horn noise detection

Page 1: lpc and horn noise detection

LINEAR PREDICTIVE CODING METHODS AND HORN NOISE DETECTION 

By P GOPIKRISHNA (12)EASHWAR JEEVAN(15)V V N PRANATHI(30)

Page 2: lpc and horn noise detection

• Introduction to speech coders.• Speech production and

modeling(coding).• Basic Principles of Linear

Predictive Analysis.• The Autocorrelation Method.• The Covariance Method.• Solution of the LPC Equations.• Horn noise detection using LPC

Contents

Page 3: lpc and horn noise detection

Speech Coders

Page 4: lpc and horn noise detection

Waveform Codec• Waveform codec’s attempt, without using any

knowledge of how the signal to be coded was generated, to produce a reconstructed signal whose waveform is as close as possible to the original.

• This means that in theory they should be signal independent and work well with non-speech signals.

• Generally they are low complexity codec’s which produce high quality speech at rates above about 16 kbits/s.

• When the data rate is lowered below this level the reconstructed speech quality that can be obtained degrades rapidly

Page 5: lpc and horn noise detection

Source Codec• Source coders operate using a model of how the

source was generated, and attempt to extract, from the signal being coded, the parameters of the model.

• It is these model parameters which are transmitted to the decoder.

• Source coders for speech are called vocoders, and work as follows.

• The vocal tract is represented as a time-varying filter and is excited with either a white noise source, for unvoiced speech segments, or a train of pulses separated by the pitch period for voiced speech.

• Therefore the information which must be sent to the decoder is the filter specification, a voiced/unvoiced flag, the necessary variance of the excitation signal, and the pitch period for voiced speech.

Page 6: lpc and horn noise detection

Desirable Properties of a Speech Coder• Low Bit-Rate• High Speech Quality• Robustness Across Different Speakers /

Languages• Robustness in the Presence of Channel Errors• Good Performance on Nonspeech Signals• Low Memory Size and Low Computational

Complexity• Low Coding Delay

Page 7: lpc and horn noise detection

Applications of Speech CodingDigital Transmissions

◦On wired telephone: Multiplexing Integration of services

◦On wireless channels: Spectral efficiency For better protection against errors

Voice mail/messagingStorage: telephone answering

machineSecure phone

Page 8: lpc and horn noise detection

• study human hearing, especially masking

• speech production mechanism• speaker characteristics• linguistic code (recognition-

synthesis)• thought-to-speech

Future in speech coding

Page 9: lpc and horn noise detection

Speech production and modeling

Page 10: lpc and horn noise detection
Page 11: lpc and horn noise detection

Speech Signal

Page 12: lpc and horn noise detection

Speech Spectrum for a Voiced Sound

Page 13: lpc and horn noise detection

current sample

time

short-term prediction

short-term - resonance of vocal tractlong-term - periodicity of voiced speech (vocal cord vibration)

long-term prediction

source filter speech

log spectrum

Page 14: lpc and horn noise detection

LPC is short term linear prediction that predicts the coefficients based on previous signal samples which can be transmitted instead of speech at a low bit rate than speech itself

Linear model of speech production

A(Z)-Analysis Filter 1/A(Z)-Synthesis Filter

Page 15: lpc and horn noise detection

At transmission end-coding

At reception end-decoding

i/p-speecho/p-coded speech parameters

i/p-coded speech parameters o/p- speech

LPC vocoder

Page 16: lpc and horn noise detection

The same principle as in H.Dudley’s VocoderUsed by US Government (LPC-10) - 2.4 kbs

LPC vocoder

Page 17: lpc and horn noise detection

Short Term Linear Prediction

• The coefficients of H(z)=1/A(z) can be obtained by linear prediction.

• Short term analysis on x(n) speech signal– Frames of 10 to 30 ms.

• Least square error criterion

Page 18: lpc and horn noise detection

.)(

1

1

1)(

)()(

)()()(

,)()()(

)},(...)2()1({)(

1

1

1

21

zAzazGUzSzH

zGUzSzazS

nGuinsans

pnsansansans

p

i

ii

p

i

ii

p

ii

p

Short Term Linear Prediction

Page 19: lpc and horn noise detection

.1)()()(

)()()()()(

).()(

).()()(

1

1

~

1

~

1

p

k

kk

p

kk

p

kk

p

kk

zazSzEzA

knsansnsnsne

knsans

nGuknsans

LPC Analysis Equations

Error transfer function:

The prediction error:

Page 20: lpc and horn noise detection

.)()(

)(

)()()()(

2

1

2

m

p

knknn

mnn

n

n

kmsamsE

meE

mnememnsms

We seek to minimize the mean squared error signal:

LPC Analysis Equations

Page 21: lpc and horn noise detection

p

knkn

mnn

p

kk

mnn

ka

kmsmsamsE

1

1

2

).,0()0,0(

)()()(

The minimum mean-squared error can be expressed as:

LPC Analysis Equations

Page 22: lpc and horn noise detection

.01

),()(),(

01

),()(),(

)(

.,010),().(

)(

)(1

0

1

0

1

0

2

pkpi

kimsmski

pkpi

kmsimski

meE

otherwiseNmmwnms

ms

kiN

mnnn

pN

mnnn

pN

mnn

n

Autocorrelation Method

w(m): a window zero outside 0≤m≤N-1The mean squared error is:

Page 23: lpc and horn noise detection

Autocorrelation Method

)(),(

:functionation autocorrel simple toreducesfunction covariance thek,-i offunction aonly is),( Since

.01

),()(),()(1

0

kirki

ki

pkpi

kimsmski

nn

n

kin

mnnn

Page 24: lpc and horn noise detection

.

)()3()2()1(

)0(...)3()2()1()3(...)0()1()2()2(...)1()0()1()1(...)2()1()0(

:as formmatrix in expressed becan and

1),(|)(|

:)()( i.e. symmetric, isfunction ation autocorrel theSince

2

1

1

prrrr

a

a

a

rprprprprrrrprrrrprrrr

piirakir

sokrkr

n

n

n

n

pnnnn

nnnn

nnnn

nnnn

p

knkn

nn

Autocorrelation Method

Levinson Durbin algorithm is often used to solve these equations

by using the properties of toeplitz matrix and linear

predictionvinso Durbin algorithm is often used to solve

these equations

Page 25: lpc and horn noise detection

Autocorrelation Method

Page 26: lpc and horn noise detection

Autocorrelation Method

Page 27: lpc and horn noise detection

1

1

0

1

0

2

.01

),()(),(

, variablesof changeby or,01

),()(),(

:as defined ),(with

)(

:directlyspeech unweighted theuse to and 10 error to computing of interval thechange

iN

imnnn

n

N

mnn

n

N

mnn

pkpi

kimsmski

pkpi

kmsimski

ki

meE

Nm

The Covariance Method

Page 28: lpc and horn noise detection

.

)0,(

)0,3()0,2()0,1(

),()3,()2,()1,(

),3()3,3()2,3()1,3(),2()3,2()2,2()1,2(

),1()3,1()2,1()1,1(

3

2

1

pa

a

a

a

ppppp

ppp

n

n

n

n

pnnnn

nnnn

nnnn

nnnn

The resulting covariance matrix is symmetric, but not Toeplitz, and can be solved efficiently by a set of techniques called Cholesky decomposition

The Covariance Method

Page 29: lpc and horn noise detection

The Covariance Method

Page 30: lpc and horn noise detection

Autocorrelation/Covariance Summary

1.Autocorrelation Method => signal is windowed by a tapering window in order to minimize discontinuities at beginning (predicting speech from zero-valued samples) and end (predicting zero-valued samples from speech samples) of the interval

2. Covariance method => the signal is extended by p samples outside the normal range of to include p samples occurring prior to m=0 (they are available) and eliminates the need for a tapering window; resulting matrix of correlations is symmetric

Page 31: lpc and horn noise detection

COMPARISON

Page 32: lpc and horn noise detection

Results

Page 33: lpc and horn noise detection

Results

Page 34: lpc and horn noise detection

•we have added a speech signal and known horn noise .• Threshold value observed practically for given horn noise.•LPC residue for horn and silence is low whereas for speech it is high. •The above property is used to develop algorithm to detect horn noise.

Horn noise detection

Page 35: lpc and horn noise detection

Results

Page 36: lpc and horn noise detection

Softwares:

Page 37: lpc and horn noise detection

REFERENCES:•SPEECH CODING ALGORITHMS Foundation and Evolution of Standardized Coders -WAI C. CHU

•Lecture Notes in Speech Production, Speech Coding, and Speech Recognition Mark Hasegawa-Johnson of University of Illinois

•Introduction to Speech Processing | Ricardo Gutierrez-Osuna | CSE TAMU(Texas A & M U niversity)Linear Predictive Coding, Jeremy Bradbury, December 5, 2000

Page 38: lpc and horn noise detection

THANK YOU

ANY QUERIES?