[신호처리 10] MFCC
Complex Cepstrum of Speech-Like Sequences
is a sum of decaying exponentials that are scaled by 1/n. 스케일링해서 계속 더해지는 형태로 나타냄
time delyay 가 추가된 형태로 iverse transform 만들어짐
Impulse Trains Convolved with Rational z-Transform Sequences (1)
ĥ[n] ; low 부분에 집중된 vocal tract
p̂[n] ; train 형태로 나타난 vocal cord
두가지 도메인으로 나눠서 생각해볼 수 있음
제로에 해당하는 거 빼고는 high quefrency에 몰려져 있음
low, high를 쪼개보면 두개로 쪼개서 생각해볼 수 있음
vocal tract 에 집중된 성분, vocal code에 집중된 성분으로 나눠볼 수 있음
=> 음성의 메세지 성분과 화자 성분을 쪼개어 나타내볼 수 있음
Converting LPC Coefficients into Cepstrum(1)
나중에 다시 나오니,여기선 스킵
Homomorphic Filtering (1)
Complex cepstrumof speech-like sequence slow
low quefrency: system response h[n] ←vocal tract
high quefrency: pulse train p[n] ← pitch
Smoothing interpretation of homomorphic deconvolution. Let’s view log X(ω) as a “time signal”that consists of low-frequency and high-frequency contributions.
log X(ω) 를 IFTF하면 cepstrum(ŝ[n] = ĥ[n] + p̂ [n]) 이 됨
IFTF이 실제로는 FTF을 e^(-jωn)에서 -를 +로 바꿔주는 내용이므로
사실 FTF과 별차이가 없기 때문에 log X(ω)를 Time domain 으로 생각해줌
Then lowpassor highpassfilter this signal to separate the two frequency components.
log X(ω) time 도메인 신호를 필터링 해주면 성대와 성도를 나눠볼 수 있음
Homomorphic Filtering (2)
time domain 신호 -> cepstrum(D*)x̂ [n] : cepstrum 성분 얻게됨 -> liftering(l[n])으로 원하는 성분 얻음 -> 여기에 대해서 inverse D^-1* -> time domain 복원
cepstrum transform은,
FTF -> log -> IFTF
위의
log: spectrum domain 부분들
filtering 과정을 frequnecy를 selection 하는 과정으로 바꿔볼 수 있음
HomomorphicFiltering (3)
cepstrum 용어들
Nomenclaturecepstrum↔ spectrum
quefrency↔ frequency
lifter ↔ filter
Spectrum smoothing
log를 time-domain으로 생각해서 둘을 얻어낼 수 있음
Discrete Complex Cepstrum
Use the DFT for digital processing
x̂ [n]을 뽑을 때 왜곡을 줄이는 방법들
1.
Aliasing occurs in since x̂ [n] is infinitely long.
(x̂ [n]을 뽑을 때, 무한하게 길면)→ The DFT size must be “large enough”.
무한이 길면 에일리언싱이 생기기 때문에 윈도윙을 하는데, 사용하는 DFT size를 최대한 키워서 진행
2. phase 성분을 이용해서 IFTF 함
Unwrap phase to ensure a continuous phase function.
phase -pi ~ pi 주기적으로 반복되므로, 계속적으로 +pi를 넘어가면 -pi로 진행
umwraping하여 연속한 부분을 보장해줌
불규칙한 부분에 위쪽을 계속 유지해줌 (unwrap) 불필요하게 점프되는 구간이 없어져서 신호가 제대로 추정이 가능해짐
Short-Time HomomorphicAnalysis of Periodic Sequences
여기서는 skip
Short-Time Speech Analysis (1)
window를 최대한 크게해서 2~3 피치 주기로 설정
- Notes①Window duration : 2~3 pitch periods. It should be adaptive (20~40ms).
- The center should be aligned with h[n] for good spectral magnitude estimation.
2~3 window에 해당하는 것을 windowing 해줌
FTP을 해주게 되면
FTP 결과는 여기에 있는 얇은 선 (magnitude spectrum)
얇은 선(envelop) - vocal tract/ 자글자글한 선 - vocal cord
CepstralAnalysis (1) (from Gold’s book)
엔벨롭 :왼쪽 / 주기성분 : 오른쪽
실제 신호에 대한 예제
phase가 wraping 되면서 불연속 적인 곳들은 언랩핑하는 형태로 만들면
(b),(d)를 이용하면 IFTF complex spectrum (e)
(f) : (b) magnitude absolute value 취해서 log, Inverse 하면 real cepstrum
(real 캡스트럼은 (b)만 취함??)
느리게 변하는 엔벨롭 성분을 구하기 위해 (e)에 해당 부분을 쳐냄
얘네를 쳐내면
이런 결과들을 얻게됨
여기에 해당하는 부분들
이렇게 변형 할 수 있다.
Lifteringon Cepstrumof the Voiced Signal (1)
ㅇㅇ
아랫 부분인 voiced 에 해당하는 부분을 잘라서 단면을 살펴보면
이런 스펙트럼 모양을 갖게됨
가운데 low quefrency에 해당하는 성분들을 liftering을 해서 위 그래프의 smooth vocal tract을 얻게됨
폭이 넓어지면 엔벨롭을 정밀하게 찾아갈 수 있지만 급격하게 변화하는 high frequency를 쫓아가려는 경향을 띄게됨
아직까지는 vocal cord를 침범하는 폭은 아니지만 폭을 적절히 설정하는 것이 중요
Complex Cepstrumof Unvoiced Speech
skip
Analysis/Synthesis Structures (1)
1024-point DFT to avoid DFT aliasing
에일리언싱을 피하려면 충분 큰 DFT 사이즈를 가져야함
Frame interval: 10~20ms
For voiced segments, a pitch-adaptive Hamming window of length of 2~3 pitch periods is applied.
하는 게 가장 이상적임
Analysis/Synthesis Structures (2)
음성을 코딩할 때
pitch estimate -> adaptice window (pitch 크기에 따라 windowing 크기 정수배로 바뀜)
Analysis
윈도윙 된 것을 캡스트럼 + 윈도윙 -> vocal tract 성분 얻어짐
cepsturm의 vocal tract에 해당 하는 성분에서 윗 과정(DFT->ext->IDFT)을 다시 취하면 타임 도메인으로 돌아오게 되고
pitch를 generation(vocal tract 해당 성분) 해서 컨볼루션해서 음성을 복원하게 됨 x-[n]
Applications
Pitch estimation
Spectral envelope estimation
Mel-frequency cepstralcoefficients (MFCC)
low- vocal tract 음성신호에서 중요한 부분(high는 날려서 음성인식에 사용)
LPC cepstral coefficients (LPCC)
Mel-frequency cepstralcoefficients (MFCC) (1)
x(n)(입력) -> 해밍 -> FTF -> filter bank (weighted sum 방식) -> 로그 씌우기 -> DCT를 통해서 캡스트럼을 coefficient 얻음 = >MFCC
이전과 다른 점은?
2번 식에서 주파수 도메인에서 얻은 다음 타우를 구하고 weight를 써서 weighted 형태에서 log를 씌우면 MFCC가 됨
MFCC의 결과를 로그스펙트럼에서 DCT(IFTF가 맞지만 결과가 complex num이 나오면 복잡해 지니까 편의상 imaginary복소수가 없은 DCT를 통해서 해당 결과를 얻음) 이것만 가지고도 충분히 얻어낼 수 있음
Summary
Cepstral(Homomorphic) processing
- Convolution becomes addition.
- Separates the source (pitch) and the system (vocal tract).
convolution 돼 있는 것을 Homomorphic으로 분리해낼 수 있음
Cepstrum
- Inverse Fourier transform of log magnitude spectrum.
- Terms: cepstrum, quefrency, liftering
- MFCC is the most popular feature in speech recognition.