1 CS 188: Artificial Intelligence Spring 2009 Lecture 23: Speech Recognition 4/14/2009 John DeNero – UC Berkeley Slides adapted from Dan Klein Announcements Written 3 due on Thursday in lecture Please don‟t be late; no slip days allowed Project 4 posted Due next Wednesday 4/22 at 11:59pm Use up to two slip days Course contest update You can qualify for the tournament starting tonight First person to submit an agent will make me happy 2
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
1
CS 188: Artificial Intelligence
Spring 2009
Lecture 23: Speech Recognition
4/14/2009
John DeNero – UC Berkeley
Slides adapted from Dan Klein
Announcements
Written 3 due on Thursday in lecture
Please don‟t be late; no slip days allowed
Project 4 posted
Due next Wednesday 4/22 at 11:59pm
Use up to two slip days
Course contest update
You can qualify for the tournament starting tonight
First person to submit an agent will make me happy
2
2
Today
Particle filter recap
Speech recognition using HMMs
3
Particle Filtering Review
An approximate technique for filtering: P( Xt | e1 , … , et )
Idea: always keep N guesses (samples) of the value of Xt
Inititial samples, or particles, are drawn from the prior P(X1)
0.0 0.1
0.0 0.0
0.0
0.2
0.0 0.2 0.5
3
Particle Filtering Review
An approximate technique for filtering: P( Xt | e1 , … , et )
Idea: always keep N guesses (samples) of the value of Xt
Inititial samples, or particles, are drawn from the prior P(X1)
Three operations:1) Elapse time: draw a sample for Xt+1
from each particle using P(Xt+1 | Xt)
Particle Filtering Review
An approximate technique for filtering: P( Xt | e1 , … , et )
Idea: always keep N guesses (samples) of the value of Xt
Inititial samples, or particles, are drawn from the prior P(X1)
Three operations:1) Elapse time: draw a sample for Xt+1
from each particle using P(Xt+1 | Xt)
2) Observe: weight all particles by the likelihood of the evidence et
Inco
rpo
rate
ne
w e
vid
en
ce
4
Particle Filtering Review
An approximate technique for filtering: P( Xt | e1 , … , et )
Idea: always keep N guesses (samples) of the value of Xt
Inititial samples, or particles, are drawn from the prior P(X1)
Three operations:1) Elapse time: draw a sample for Xt+1
from each particle using P(Xt+1 | xt)
2) Observe: weight all particles by the likelihood of the evidence et
3) Resample: sample new particles in proportion to those weightsIn
co
rpo
rate
ne
w e
vid
en
ce
Resampling Step Details
Each particle is already weighted by
the evidence likelihood: P( et | xt )
We randomly choose particles in
proportion to those weights
Probability of choosing a particle
is proportional to its weight
Each new particle is chosen
independently, with replacement
The probability of selecting a set
of new particles is the product of
probabilities for each one
rain sun
0.7
0.7
0.3
0.3
X E P
rain umbrella 0.9
rain no „ella 0.1
sun umbrella 0.2
sun no „ella 0.8
5
SLAM
SLAM = Simultaneous Localization And Mapping
We do not know the map or our location
Our belief state is over maps and positions!
Main techniques: Kalman filtering (Gaussian HMMs) and particles
[DEMOS]
DP-SLAM, Ron Parr
Hidden Markov Models
An HMM is Initial distribution:
Transitions:
Emissions:
Query: most likely seq:
X5X2
E1
X1 X3 X4
E2 E3 E4 E5
10
6
State Path Trellis
State trellis: graph of states and transitions over time
Each arc represents some transition
Each arc has weight
Each path is a sequence of states
The product of weights on a path is the seq‟s probability
Can think of the Forward (and now Viterbi) algorithms as
computing sums of all paths (best paths) in this graph
sun
rain
sun
rain
sun
rain
sun
rain
11
Viterbi Algorithm
sun
rain
sun
rain
sun
rain
sun
rain
12
7
Example
13
Digitizing Speech
14
8
Speech in an Hour
Speech input is an acoustic wave form
s p ee ch l a b
Graphs from Simon Arnfield‟s web tutorial on speech, Sheffield: