speech not nlp remote history -...

7
1 Spraak Bart de Boer Why speech? Desire to speak with machines and animals is very old – Speech is intuitive – Speech is fast – Speech defines man, social groups and individuals Speech can make machines more acceptable and easier to use Speech not NLP Natural Language Processing is necessary for a complete system But tasks are separate – NLP without speech (written text) – Speech without NLP (fixed commands, voice recognition…) Turing test does not require speech! Remote history Speech recognition is impossible to do without computers History after computers There are no shortcuts for speech recognition Spoken words have a lot of variation – Speed, register, speaker, noise… Template matching, dynamic time warping do not really work Since 80’s: Hidden Markov Models

Upload: others

Post on 30-Sep-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Speech not NLP Remote history - VUBarti.vub.ac.be/cursus/2002-2003/ai1/material/slides_spraak.pdf · 3 Belgian technology "bon"-1 0000-5000 0 5000 10000 15000 0.0 5 0.15 0.25 Time

1

Spraak

Bart de Boer

Why speech?

• Desire to speak with machines and animals is very old– Speech is intuitive

– Speech is fast

– Speech defines man, social groups and individuals

• Speech can make machines more acceptable and easier to use

Speech not NLP

• Natural Language Processing is necessary for a complete system

• But tasks are separate– NLP without speech (written text)

– Speech without NLP (fixed commands, voice recognition…)

• Turing test does not require speech!

Remote history

• Speech recognition is impossible to do without computers

History after computers

• There are no shortcuts for speech recognition

• Spoken words have a lot of variation– Speed, register, speaker, noise…

• Template matching, dynamic time warping do not really work

• Since 80’s: Hidden Markov Models

Page 2: Speech not NLP Remote history - VUBarti.vub.ac.be/cursus/2002-2003/ai1/material/slides_spraak.pdf · 3 Belgian technology "bon"-1 0000-5000 0 5000 10000 15000 0.0 5 0.15 0.25 Time

2

Speech production

• Much more interesting history

• Partly because problem is simpler– Therefore focus in this course on speech

recognition

• Even before computers

von Kempelen (ca. 1791)

Faber (ca. 1835) The Voder (ca. 1939)

The pattern Playback (ca. 1950) Fant’s model (ca. 1953)

Page 3: Speech not NLP Remote history - VUBarti.vub.ac.be/cursus/2002-2003/ai1/material/slides_spraak.pdf · 3 Belgian technology "bon"-1 0000-5000 0 5000 10000 15000 0.0 5 0.15 0.25 Time

3

Belgian technology

"bon"

-10000

-5000

0

5000

10000

15000

0.05 0.15 0.25

Time

Am

plit

ud

e

"b"

-10000

-5000

0

5000

10000

15000

0.08 0.13 0.18 0.23

Time

Am

plit

ud

e

"on"

-10000

-5000

0

5000

10000

15000

0.12 0.17 0.22 0.27 0.32

Time

Am

plit

ud

e

• Dutoit’ s Mbrola, Lernout en Hauspie

Aspects of Speech recognition

• Aim– Understanding

– Speaker recognition

• Scope– Isolated words/connected words

– Limited/Unlimited domain

– Speaker dependent/Speaker independent

Recognition State-of-the-art

• State of the art is reasonably OK– Isolated word/speaker dependent OK

– Connected word, speaker independent, limited domain also satisfactory

• But compared to humans not on the right track– More training data does not improve

performance as well as it does with humans

Synthesis state-of-the-art

• Less complex than recognition

• Concatenation models rule

• Intonation is the main problem– Depends on meaning!

Signaalverwerking (1)Welke features?

[e]

t i m e

[i]

t i m e

[o]

t i me

[u]

t i m e

[a]

t i m e

Signaalverwerking (2)

[a]

frequency

po

wer

700Hz1380 Hz

2580 Hz3750 Hz

[e]

frequency

po

wer

300 Hz

550 Hz2030 Hz 2630 Hz

[i]

frequency

po

wer

200

2480 Hz

2760 Hz

3500 Hz

[o]

frequency

po

wer

[u]

frequency

po

wer

480 Hz

830

2830 Hz 3860 Hz

230 Hz

580 Hz

2530 3460 Hz

Page 4: Speech not NLP Remote history - VUBarti.vub.ac.be/cursus/2002-2003/ai1/material/slides_spraak.pdf · 3 Belgian technology "bon"-1 0000-5000 0 5000 10000 15000 0.0 5 0.15 0.25 Time

4

Signaalverwerking (3)De spraaksynthesizer van Lernout en Hauspie

Techniek: spraakherkenning

• Statistische benadering volgens Russell en Norvig:

• P(signal) kunnen we negeren• P(words) is het taalmodel (hoe waarschijnlijk is

een bepaald woord/reeks woorden)• P(signal|words) ishet acoustische model: hoe

waarschijnlijk is het, gegeven een waarschijnlijke reeks woorden, dat dit signaal werd gegenereerd?– Produktiemodel

( ) ( ) ( )( )

||

P words P signal wordsP words signal

P signal=

Het acoustische model

• Dit is een produktiemodel– Vroeger werd templatematching gebruikt. Dit bleek niet

zo goed te werken

• Het model kan reeksen features produceren– Gegeven een reeks features, kan het uitgerekend

worden hoe groot de kans is dat ze geproduceerd is door een gegeven model.

• Hidden Markov Model:– Stochastische “ finite state machine”– In elke toestand kunnen een aantal symbolen

geproduceerd worden

HMM voor spraak

• Hidden Markov Model specificeert toestanden en overgangswaarschijnlijkheden

• Ook waarschijnlijkheden om symbolen in een bepaalde toestand te genereren– Gegeven een symbool weet jeniet in welke toestand je

zit: vandaar “Hidden”

0.5

0.3

0.5

0.5

1

0.2

1A:0.5B:0.3C:0.2

B:0.7C:0.3

C:0.2D:0.8

E:0.6F:0.4

De 3 HMM-problemen

• Gegeven een reeks, wat is de waarschijnlijkheid dat hij door een gegeven model is gegenereerd?– Forward-backward algoritme

• Gegeven een reeks, wat is het meest waarschijnlijke pad door een gegeven model?– Viterbi-algoritme

• Hoe kun je een model trainen om gegeven reeksen met de hoogste waarschijnlijkheid te genereren?– Baum-Welch algoritme

Waarom zijn dit lastige problemen?

• De domme manier is exponentieel in de lengte van de reeks– Voorbeeld voor een HMM met 2 states en twee

outputsymbolen:� � � � � �

� � � � � � � �� �

� � � � � �� �

� � � �� � � � � �� �

� � � � � �� �

� �� � � � � �� �

� � � � � �� �

� � � � � � �

� � � � � �� � � �� � �

� � � �� � � �� � �

�� � � �� � � �� � �

� � � � � �

�� � � �� � � �� � �

�� � � �� � � �� � �

� � �

�� � � �� � � �� � �

� � � � � �

� �� � � �� � �� �

� � �� � �� �

�� � �� � �� �� �� � � �

�� � �� � �� �

�� � �� � �� �� �

�� � �� � �� �

� �

� �

� �

� �

� �� ��� ��� �� �� �� ��

� �� ���� �� ��

������

Page 5: Speech not NLP Remote history - VUBarti.vub.ac.be/cursus/2002-2003/ai1/material/slides_spraak.pdf · 3 Belgian technology "bon"-1 0000-5000 0 5000 10000 15000 0.0 5 0.15 0.25 Time

5

Gebruik Markov-

eigenschap

How you got to a certainstate doesn’ t matter, onlythe probability of beingthere.

S1

S2

SN

S1

S2

SN

.

.

.

.

.

.

.

.

.

.

.

.

The total probability of generating a sequenceof symbols is the sumover all states of gene-rating the sequence andbeing in each state.

Ot–1Ot

The probability of a state is the sum over the probabili-ties of previous states times the transition probabilities and the probability of generating the correct output.

Viterbi-illustratie

S1

S2

SN

.

.

.

S1

S2

SN

.

.

.

Find best ways to get toeach state at each time.

Then, for each timefind most likely pathto have producedoutput sequence.

Note that there is only one pathentering each state (there is onlyone best path). However, there can be multiple paths leaving a state, or no paths leaving a state.

Hidden Markov Models

• Snel

• Trainbaar– Hoe meer trainingdata hoe beter

– Designkeuzes doen er niet zo extreem veel toe

• Zeer praktische manier van spraakherkenning– Maar: eigenlijk niet zo’n realistisch model van spraak

– Men poogt met Bayesiaanse netwerken nog betere herkenning te krijgen

Spraaksynthese

• Verschillende methoden– Difoonsynthese meest gebruikt

• Achter elkaar plakken van klanken werkt niet:– Klanken beïnvloeden elkaar teveel

Illustratie beïnvloeding

A pp e l s a p

Note that spectra of sounds are not con-stant over time and that sounds merge into each other.

Difoonsynthese

• Knip het signaal in stukken op de plaatsen waar de spectra het meest constant zijn– Op de centra van klanken– Dan hou je dus de overgangen over

• Hiervan zijn er een paar duizend per taal– Geen probleem voor huidige computers

• Maar hoe plak je ze aan elkaar?• En hoe verander je duur en intonatie?

Page 6: Speech not NLP Remote history - VUBarti.vub.ac.be/cursus/2002-2003/ai1/material/slides_spraak.pdf · 3 Belgian technology "bon"-1 0000-5000 0 5000 10000 15000 0.0 5 0.15 0.25 Time

6

Geleidelijke overgangVermenigvuldig met aflopend window:

Tijd compressievoorbeeld

• Normaal

• Normaal, 2x versneld

• Twee maal gecomprimeerd– Lijkt beter op het oorspronkelijke signaal

• Een soortgelijke techniek kan gebruikt worden voor het samenvoegen van difonen.

PSOLA (illustrations) PSOLA—Mapping windows

Original: 701 samples, 7 pitch periods,

from 133Hz to 119 Hz

Goal: ~1000 samples from 140 Hz to 100 Hz

11 pitch periods(+ edges)

Note increasing length of windows

PSOLA: Epochs

Analysis epochs

1

2

3

4

5

6

7

Synthesis epochs 1

2

3

4

5

6

7

9

8

11

10

PSOLA example

Before:

After

Red lines indicate used regions

etc...

Page 7: Speech not NLP Remote history - VUBarti.vub.ac.be/cursus/2002-2003/ai1/material/slides_spraak.pdf · 3 Belgian technology "bon"-1 0000-5000 0 5000 10000 15000 0.0 5 0.15 0.25 Time

7

Tenslotte

• Twee technieken van de state-of-the-art van spraakverwerking

• Kwaliteit hangt erg sterk af van tuning.• Ook van kwaliteit en hoeveelheid data waarop de

modellen gebaseerd zijn• Men is echter nog steeds op zoek naar betere

technieken, omdat er nog een fundamenteel verschil in performance tussen mensen en computers zit.