Академический Документы
Профессиональный Документы
Культура Документы
WITH APPLICATION ON
CONTENTS
1. Matlab Tutorial 2. Mel-Frequency Cepstral Coefficients (MFCC) 3. Dynamic Time Warping (DTW) 4. K-Nearest Neighbor (KNN)
REFERENCES
References (Uploaded on course webpage.) Getting Started with Matlab. Dynamic Time Warping Algorithm Review.
MATLAB
Downloading and installation www.mathworks.com kftp.kaist.ac.kr
VARIABLES
>> a = 1 >> b = 2 >> c = a + b >> d = cos(a)
>> sin(a)
>> e = a * b; >>
>> b = zeros(3, 1)
>> b = ones(3) >> b = rand(2, 3)
>> p = a * inv(a)
>> p = a .* a >> a .^ 3
Complex Numbers
c = [3 + 4i, 4 + 3j, -i, 10j]
WORKSPACE
>> whos >> save myfile.mat >> clear >> load myfile.mat
CHARACTER STRINGS
>> myText = Hello, world >> otherText = Youre right >> longText = [myText, , otherText] >> a = 3;
FUNCTIONS
>> A = [1 3 5] >> B = [10 6 4] >> maxA = max(A) >> [maxA, location] = max(A)
PLOTS
Line Plots >> x = 0 : pi / 100 : 2 * pi; >> y = sin(x); >> plot(x, y)
>> xlabel(x);
>> ylabel(sin(x)); >> title(Plot of the Sine Function); >> plot(x, y, r-o); >> hold on; >> y2 = cos(x); >> plot(x, y2);
SCRIPTS
Sample Script >> edit plotrand % Generate random data from a uniform distribution. n = 50;
r = rand(n, 1);
plot(r); >> plotrand
SCRIPTS
Loops and Conditional Statements
a = rand(3, 1) - 0.5;
for i = 1 : length(a) if a > 0 a(i) = i * a(i);
SCRIPTS
Script Locations >> addpath([pwd \mypath]);
FUNCTION
function [a, b] = myFunc(c) a = 2 * c; b = 3 * a;
HELP
>> doc mean >> help mean
ISOLATED-WORD RECOGNITION
Feature Extraction
0.8 0 6 0.6 500 5 0.4 1000 1500 2000 2500 2 3000 3500 4000 0 0.5 1 1.5 2 2.5 x 10
4
Spectrogram
x 10
-4
0.2
Frequency (Hz)
-0.2
-0.4
-0.6
0.5
2.5
Classification
Spectrogram 0 6 500 5 1000 1500 2000 2500 2 3000 3500 4000 0.5 1 1.5 Time (sec) 2 2.5 1 4 x 10
-4
Frequency (Hz)
Three
MFCC
0.8 0.6
0.4
0.2
-0.2
-0.4
-0.6
0.5
1.5
2.5 x 10
4
frameLen
MFCC
0.8 0.6
0.4
0.2
-0.2
-0.4
-0.6
0.5
1.5
2.5 x 10
4
frameShift
MFCC
Spectrogram 0 6
500
x 10
-4
0 0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
500 5 1000 1500 2000 2500 2 3000 3500 4000 0.5 1 1.5 Time (sec) 2 2.5 1 4
20
1000 1500
40
Frequency (Hz)
60
2000
80
100
MFCC
Spectrogram 0 6
500
x 10
-4
0 0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
500 5 1000 1500 2000 2500 2 3000 3500 4000 0.5 1 1.5 Time (sec) 2 2.5 1 4
20
1000 1500
40
Frequency (Hz)
60
2000
80
100
DTW
1 0.8 0.6 0.4 0.2 0 -0.2 -0.4 -0.6 -0.8
0.5
1.5
2.5 x 10
4
0.5
1.5
2.5 x 10
3
4
KNN
KNN
HOMEWORK1-2
Make function function recogRate = IWRS(pathToDB); recogRate = TheNumberOfRightAnswers / TheNumberOfTestSamples 3~5 page report Understand MFCC. What happened if you change parameters.
Intermediate results and final results (recognition rate).
Why it happened.