You are on page 1of 68

2

c im tn hiu m thanh
1
M hnh h thnh gic
2
Cc phng php ADL trn
m thanh
3
Tho lun, bi tp, v
seminar
4
Cc thnh phn c bn ca tai ngi v
ngun pht m thanh
3
4
Ngun
Dao
ng
5
1 chiu
Cc dng sng
6
7
Tai c nhng cm th khc
nhau (m bng, m trm).
Ging n bng v ging nam
trm.
cao ca m thanh mi
ngi khc nhau
cao
(Pitch)
cao c xc nh bng s dao ng
ca tn hiu trong 1 giy (tn s - Hz).
8
Bc sng
ln
Mt dao ng
cao(Pitch)
Cng
Quyt
nh
9
Pitch cao Pitch thp
cao(Pitch)
Tn s thp Tn s cao
10
Bc sng ngn,
tn s cao
Bc sng di,
tn s thp
cao(Pitch)
Pitch cao
Pitch thp
ln (Loudness)
11
Bc sng
ln
Mt giao ng
Cng
Quyt
nh
ln (Loudness)
12
C

n
g

13
ln (Loudness)
c o bng n v
decibel (dB)
m thanh nh nht m
tai c th cm nhn c
l 0dB.
Ngng au l 120 dB.
ln (Loudness)
14
Cng
Dao ng trong khng
kh cng ln th m
to ra cng to.
Mc p sut khng
kh khi mt vt dao
ng.
p sut khng kh ny
c xem nh cng
.
ln
Ty thuc vo cm
nhn ca mi ngi
Mc thnh ca
tai ngi
Tn s cao nghe
ln tn s thp
15
- m thanh A c cng ln hn m thanh B (nng lng cao hn).
- m thanh B c tn s cao hn m thanh A (trong cng khong thi gian,
m thanh B cho nhiu sng ).
cao(Pitch)
m thanh A m thanh B
ln (Loudness)
16
Ha m th nht n th nm ca
ca 1 ting n
m sc(Timbre)
m sc quyt nh cht
lng hay mu sc ca m.
m sc c quyt nh
bi cc ha m v mi
quan h gia cc ln
ca cc ha m.
17
m sc(Timbre)
Tn s
m c
bn
Ha m
18
Sng vung ch cha cc ha m l
m sc(Timbre)
m c
bn
m tng
hp
19
Sng tng hp ca cc ha m
m sc(Timbre)
20
m sc(Timbre)
21
20 Hz-20kHz
Nhy cm:
1kHz-5kHz
Tp m
m thanh
Tp m
22
c im tn hiu m thanh
1
M hnh h thnh gic
2
Cc phng php ADL trn
m thanh
3
Tho lun, bi tp, v
seminar
4
c im tn hiu m thanh
1
M hnh h thnh gic
2
Cc phng php ADL trn
m thanh
3
Tho lun, bi tp, v
seminar
4
23
Tai ngi
Cc bin
i v mt
thi gian
ca p m
c tnh v c
thi gian v ph
tn s
24
25
26
27
Critical band
c Harvey
Fletcher gii
thiu vo
1940
n v: Bark -
tng ng
rng ca 1
critical band
Trong khong tn s m HVS
c th cm nhn (20 Hz-
20kHz) c chia thnh cc
critical band vi s lng
khc nhau (24, 25, 32, 55,
hoc 109) ty thuc vo tn s
ngng
28
Critical band
29
Ngy trang
tn s
30
Ngng
nghe
31
0 2 4 6 8 10 12 14 16 18 20 22 24
critical band [Barks]
60
40
20
0 M

c
k

c
h
t
h

c
h
[
d
B
]
Hm nghe
Tn s (kHz)
M

c
k

c
h
t
h

c
h
[
d
B
]
32
0 2 4 6 8 10 12 14 16 18 20 22 24
critical band [Barks]
60
40
20
0 M

c
k

c
h
t
h

c
h
[
d
B
]
Khong lng
Ngng nghe
m thanh
33
0 2 4 6 8 10 12 14 16 18 20 22 24
critical band [Barks]
60
40
20
0
M

c
k

c
h
t
h

c
h
[
d
B
]
Tn hiu
watermark
Tn hiu m
thanh cha
34
Ngy trang
thi gian
35
masker
maskee
Tn hiu m thanh cha
Tn hiu
Tn hiu watermark
Nhiu
36
Ngy trang tn
hiu m thanh
Ngy trang
tn s
Ngy trang
thi gian
37
Mc ngy trang
38
V hnh
(Cht lng)
Dung lng
cha
Bn vng
39
H THNH GIC
Sc
cha
V
hnh
Dung
lng
40
M

n
h
g
i

p
h

t
h

n
h
g
i

c
41
c im tn hiu m thanh
1
M hnh h thnh gic
2
Cc phng php ADL trn
m thanh
3
Tho lun, bi tp, v
seminar
4
42
M ha bit t quan trng nht
Phng php dng ting vang
M ha pha
Phng php Patch work
43
Sample Rate Bit depth
1x-bit 2x-bit 4x-bit
44
Sample (Mu)
Tp tin
m thanh
3 4 5 6 5 4 3 2 2 3 1 1 3 4 5 5
101
(watermark)
6 1 4
110
1 0 1
111 000
100 001
101
7 0 5
Chn mu
ngu nhin
45
Min thi gian
Thut ton n gin nht
Kh nng nhng cao, chi
ph thp
46
Qu trnh nhng
Chn ngu nhin hai tp A = {a
i
} v B = {b
i
}
Bc 1
Tnh li
Tnh gi tr mi cho A v B
Bc 2
Thay th cc gi tr a
i
v b
i
bng cc gi tr mi
Bc 3
( ) ( )
( )
2
2
1 1
1
N N
i i
i i
a a b b
S
N N
= =
+
=


( )
( )
*
*
/ 2
/ 2
i i
i i
a a sign a b CS
b b sign a b CS

= +

47
Qu trnh trch
Tnh gi tr thng k Bc 1
So snh T
2
vi ngng Bc 2
Nu T
2
> c nhng watermark
Ngc li khng c
( )
2
2
2
a b
T
S

=
48
1 1
,
j j j
k k k j k e e e
+ +
( ( ( A =

Phn on tn hiu
cha vi chiu di
N
Bc 1
Mi on c bin
i bng DFT
Bc 2
Tnh s khc bit
ca mt ma trn pha
vi cc ma trn pha
xung quanh
Bc 3
Ma trn phase

j
[k]
Ma trn cng
|A
j
[k]|
0 k N/2 1, 0 j N - 1
49
( )
t
e
(+

' ( =

1
0
1
2
m k
k
e e e
+ +
' ' ( ( ( = + A
1 1
,
j j j
k k k j k
Tn hiu thy vn
c nhng vo
ph pha u tin
Bc 4
To ma trn pha
mi
Bc 5
Kt hp ma trn
pha mi v ma trn
cng (c)
Bc 6
Bin i DFT
ngc
Bc 7
50
Phn on tn hiu
cha vi chiu di N
Bc 1
Bin i DFT cho
on tn hiu u tin
Bc 2
Xt ma trn pha Bc 3
t
e
' ( =

0
2
k
t
e
' ( =

0
2
k
Bit 0
Bit 1
51
52
C ch ting vang
Tham s: ln khi
to, tr, decay rate.
delta
tr
Mu TH gc
Mu echo1
Mu echo0
ln
ban u
Decay
rate
Decay
rate
Bit 1
Bit 0
53
nh ngha cc kernel 1 v kernel 0
Qu trnh nhng
o
0
o
1
Mu echo cho bit 1
w
1
=
1
c(t+o
1
) w
0
=
0
c(t+o
0
)
Mu TH gc Mu TH gc
D
e
c
a
y

r
a
t
e

0
D
e
c
a
y

r
a
t
e

1
Mu echo cho bit 0
54
Tn hiu gc
Tn hiu gc
Tn hiu echo
o
0 o
0
kernel 0
Qu trnh nhng
( ) ( )* ( )
w
c t c t h t =
a b c d e f g
1 0 1 1 0 0 1
55
Encode
1
a b c d e f g
o
1
Encode
0
a b c d e f g
o
0
Qu trnh nhng
56
a b c d e f g
1 0 1 1 0 0 1
nh ngha cc b trn tn hiu
B
trn1
B
trn0
Qu trnh nhng
1
0
0
( ) (1 ) ( )
M
j j
j
m t b rect t

=
=

1
1
0
( ) ( )
M
j j
j
m t b rect t

=
=

+
s s

1
1 if
( )
0 otherwise
j j
j
t t t
rect t
b
j
= w [j mod l(w)]
Vi w l watermark,
l(w) l chiu di
watermark.
1
0
1
0
1011001
(watermark)
57
Qu trnh nhng
1 0 1 1 0 0 1
58
c(t)
w
1
=c(t+o
1
)
w
0
=c(t+o
0
)
w
0
* m
0
w
1
* m
1
c
w
= c
0
+w
1
*m
1
+w
0
*m
0
Qu trnh nhng
Tn hiu
gc
Kernel
1 (w
1
)
Kernel
0 (w
0
)
B trn
0 (m
0
)
Tn hiu
nh du
B trn
1 (m
1
)
59
init(Block blocks[])
{
for (int i=0; i < blocks.length; i++)
{
if (blocks[i].echoValue() == 0)
blocks[i] = offset0(blocks[i]);
else
blocks[i] = offset1(blocks[i]);
}
}
Block offset0(Block block)
{
return (block + (block - OFFSET_0));
}
Block offset1(Block block)
{
return (block + (block - OFFSET_1));
}
Qu trnh nhng
60
Xc nh o
1
v o
0
t tn hiu
nhng
Qu trnh trch
Bc 1
Tm ph tn hiu (cepstrum)
Bc 2
T tng quan tn hiu x (R
xx
) trong min
ph
Bc 3
Xc nh thng tin nhng thng qua cc
peak ca tn hiu t tng quan R
xx
61
Qu trnh trch
F(x)
( )
( )
2
ln F x
x C
x
F
-1
F(c
x
) ( )
2
x
F c
C
x
R
xx
F
-1
62
Hm t tng quan Qu trnh trch
63
V d Qu trnh nhng
3 5 2 1 4
on m thanh gc
Echo cho bit 0
Echo cho bit 1
0 0 3 5 2
0 0 0 3 5
Gi s tr
tng ng vi
bit 1 l 2
Gi s
tr tng
ng vi bit
0 l 3
Cc tham s
o
1
= 2
o
0
= 3

0
=
1
= 0.5
64
V d nhng bit 1
3 5 2 1 4
Echo cho bit 1
0 0 3 5 2
Cc tham s
o
1
= 2
o
0
= 3

0
=
1
= 0.5
3 =
3 5 3.5 3.5 5
Kt qu sau khi nhng
on m thanh gc
3
0
0.5
+ *
65
V d nhng bit 0
3 5 2 1 4
Echo cho bit 0
0 0
0
3 2
Cc tham s
o
1
= 2
o
0
= 3

0
=
1
= 0.5
2 =
3 5 2 2.5 6.5
Kt qu sau khi nhng
on m thanh gc
2
0
0.5
+ *
66
V d qu trnh nhng
3 5 2 1 4
Cc tham s
o
1
= 2
o
0
= 3

0
=
1
= 0.5
on m thanh gc
3 5 3.5 3.5 5
3 5 2 2.5 6.5
Kt qu khi:
Nhng bit 1
Nhng bit 0
67
V d qu trnh rt trch
3 5 2 2.5 6.5
Cc tham s
o
1
= 2
o
0
= 3

0
=
1
= 0.5
on m thanh nhng
1 0.1417 0.0483 0.0548 0.2553
Kt qu
FFT ln IFFT autocorr
Echo 1
Echo 0
Bit 0
68