74.419 artificial intelligence 2004

15
1 74.419 Artificial Intelligence 2004 Speech & Natural Language Processing Natural Language Processing written text as input sentences (well-formed) Speech Recognition acoustic signal as input conversion into written words Spoken Language Understanding analysis of spoken language (transcribed speech)

Upload: others

Post on 16-May-2022

11 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 74.419 Artificial Intelligence 2004

1

74.419 Artificial Intelligence 2004 Speech & Natural Language Processing

• Natural Language Processing• written text as input• sentences (well-formed)

• Speech Recognition• acoustic signal as input• conversion into written words

• Spoken Language Understanding• analysis of spoken language (transcribed speech)

Page 2: 74.419 Artificial Intelligence 2004

2

Speech & Natural Language Processing

Areas in Natural Language Processing• Morphology• Grammar & Parsing (syntactic analysis)• Semantics• Pragamatics• Discourse / Dialogue• Spoken Language Understanding

Areas in Speech Recognition• Signal Processing• Phonetics• Word Recognition

Page 3: 74.419 Artificial Intelligence 2004

3

Speech Production & Reception

Sound and Hearing• change in air pressure ≡ sound wave• reception through inner ear membrane /

microphone• break-up into frequency components: receptors

in cochlea / mathematical frequency analysis (e.g. Fast-Fourier Transform FFT) → Frequency Spectrum

• perception/recognition of phonemes and subsequently words (e.g. Neural Networks, Hidden-Markov Models)

Page 4: 74.419 Artificial Intelligence 2004

4

Speech Recognition Phases

Speech Recognition• acoustic signal as input• signal analysis - spectrogram• feature extraction• phoneme recognition• word recognition• conversion into written words

Speech Signal

Speech Signal

composed of different (sinus) waves with different frequencies and amplitudes• Frequency - waves/second ≅ like pitch• Amplitude - height of wave ≅ like loudness

+ noise (not sinus wave)

Speech Signal

composite signal comprising different frequency components

Page 5: 74.419 Artificial Intelligence 2004

5

Waveform (fig. 7.20)

Time

Amplitude/Pressure

"She just had a baby."

Waveform for Vowel ae (fig. 7.21)

Time

Amplitude/Pressure

Time

Page 6: 74.419 Artificial Intelligence 2004

6

Speech Signal Analysis

Analog-Digital Conversion of Acoustic SignalSampling in Time Frames (“windows”)Ø frequency = 0-crossings per time frame

→ e.g. 2 crossings/second is 1 Hz (1 wave)→ e.g. 10kHz needs sampling rate 20kHz

Ø measure amplitudes of signal in time frame → digitized wave form

Ø separate different frequency components→ FFT (Fast Fourier Transform) → spectrogram

Ø other frequency based representations → LPC (linear predictive coding), → Cepstrum

Waveform and Spectrogram (figs. 7.20, 7.23)

Page 7: 74.419 Artificial Intelligence 2004

7

Waveform and LPC Spectrum for Vowel ae(figs. 7.21, 7.22)

Energy

Frequency

Formants

Amplitude/Pressure

Time

Speech Signal Characteristics

From Signal Representation derive, e.g.Ø formants - dark stripes in spectrum

strong frequency components; characterize particular vowels; gender of speaker Øpitch – fundamental frequency

baseline for higher frequency harmonics like formants; gender characteristicØ change in frequency distribution

characteristic for e.g. plosives (form of articulation)

Page 8: 74.419 Artificial Intelligence 2004

8

Page 9: 74.419 Artificial Intelligence 2004

9

Video of glottis and speech signal in lingWAVES (from http://www.lingcom.de)

Page 10: 74.419 Artificial Intelligence 2004

10

Page 11: 74.419 Artificial Intelligence 2004

11

Phoneme Recognition

Recognition Process based on• features extracted from spectral analysis• phonological rules• statistical properties of language/ pronunciation

Recognition Methods • Hidden Markov Models • Neural Networks• Pattern Classification in general

Pronunciation Networks / Word Models as Probabilistic FAs (fig 5.12)

Page 12: 74.419 Artificial Intelligence 2004

12

Pronunciation Network for 'about' (fig 5.13)

Word Recognition with Probabilistic FA / Markov Chain (fig 5.14)

Page 13: 74.419 Artificial Intelligence 2004

13

Viterbi-Algorithm

The Viterbi Algorithm finds an optimal sequence of states in continuous Speech Recognition, given an observation sequence of phones and a probabilistic (weighted) FA. The algorithm returns the path through the automaton which has maximum probabilityand accepts the observed sequence.

function VITERBI(observations of len T,state-graph) returns best-path

num-states NUM-OF-STATES(state-graph)Create a path probability matrix viterbi[num-states+2,T+2]viterbi[0,0] 1.0for each time step t from 0 to T dofor each state s from 0 to num-states dofor each transition s0 from s specified by state-graph

new-score viterbi[s, t] * a[s,s0] * bs0 (ot )if ((viterbi[s0,t+1] = 0) jj (new-score > viterbi[s0, t+1]))thenviterbi[s0, t+1] new-scoreback -pointer[s0, t+1] sBacktrace from highest probability state in the final column of viterbi[] and

return path

Viterbi-Algorithm (fig 5.19)

Page 14: 74.419 Artificial Intelligence 2004

14

Phoneme Recognition:HMM, Neural Networks

Phonemes

Acoustic / sound waveFiltering, Sampling Spectral Analysis; FFT

Frequency Spectrum

Features (Phonemes; Context)

Grammar or Statistics Phoneme Sequences / Words

Grammar or Statistics for likely word sequences

Word Sequence / Sentence

Speech Recognition

Signal Processing / Analysis

Speech Recognizer Architecture (fig. 7.2)

Page 15: 74.419 Artificial Intelligence 2004

15

Speech Processing -Important Types and Characteristics

single word vs. continuous speech

unlimited vs. large vs. small vocabulary

speaker-dependent vs. speaker-independent

training

Speech Recognition vs. Speaker Identification

Additional References

Hong, X. & A. Acero & H. Hon: Spoken Language Processing. A Guide to Theory, Algorithms, and System Development. Prentice-Hall, NJ, 2001

Figures taken from:Jurafsky, D. & J. H. Martin, Speech and

Language Processing, Prentice-Hall, 2000, Chapters 5 and 7.

lingWAVES (from http://www.lingcom.de