下載/瀏覽

Download Report

Transcript 下載/瀏覽

Specifications for the
Analog to Digital Conversion of Voice
by 2,400 Bit/Second Mixed
Excitation Linear Prediction
指導教授 陳福坤
學生
葛書銓
1
大綱



簡介
編碼器
解碼器
2
簡介
MELP (Mixed Excitation Linear Prediction)
1.
取代LPC-10 (FS-1015)
2.
以LPC作為模型基礎,並包含五項新特性:
3.
一.
mixed excitation
二.
aperiodic pulses
三.
adaptive spectral enhancement
四.
pulse dispersion
五.
Fourier magnitude modeling
每個MELP音框為22.5ms 每音框含180個samples (8000 samples/s)
3
編碼器
Low frequency removal
1.
編碼過程中第一步,使用 Chebychev 高通濾波器,截止頻率60Hz和阻
帶抑制(stopband rejection)30dB。
4
Integer Pitch Calculation
1KHz
LPF
Normalized
Autocorrelation
Function
Point
Of
Maximum
Integer Pitch
( P1 )-current frame
5
6
Integer Pitch Calculation
1.
 = 40~160,計算Normalized Autocorrelation
正規化自相關函數r ( )的定義為
r ( ) 
C (0, )
C (0,0)C ( , )
C ( m, n) 
  / 2  79
S


Sk
k  m
 n
k    / 2 80
3.
求出使正規化自相關函數最大的  值作為Pitch P1 的第一個估計值
7
Bandpass Voicing Analysis
BPF
0-500Hz
P 2 --Fractional
P1 -- current &
pitch
last frame
Pitch Refinement &
r ( P 2)  Vbp1 Point of Vbp1
Normalized Autocorrelation
Maximum
Function
BPF
500-1000HZ
Full-Wave Rectifier
+ Smoothing Filter
Vbp 2
BPF
1000-2000Hz
Full-Wave Rectifier
+ Smoothing Filter
Vbp 3
BPF
2000-3000Hz
Full-Wave Rectifier
+ Smoothing Filter
Vbp 4
BPF
3000-4000Hz
Full-Wave Rectifier
+ Smoothing Filter
Vbp 5
8
Fractional Pitch Calculation
P 2 -- Fractional
0-500Hz
BPF
P1 --Current
last frame
1.
frame &
pitch
Fractional
Pitch
Refinement
Normalized
Autocorrelation
Function
r(P 2)
Voicing
Analysis
Point of
Maximum
當0-500Hz filter output signal:
一. 使用兩個分別為前後音框 的integer pitch values (P 1 )作為候選值
二.
 為real pitch & integer pitch 的差值
三. 計算  是對兩個候選值前5個到後5個samples , 用正規化自相關
再做一次integer pitch search , 找到optimum integer pitch lag 後做
Fractional Pitch Refinement
9
Fractional Pitch Refinement
1.
假設Integer Pitch為 T 個樣點,假定我們求出r ( ) 的最大值發生在 =
T ,最大值可能位於區間 T and T+1 或 T-1 and T 內,The fractional
offset  :
CT (0, T  1)CT (T , T )  CT (0, T )CT (T , T  1)
=
CT (0, T  1)[CT (T , T )  CT (T , T  1)]  CT (0, T )[CT (T  1, T  1)  CT (T , T  1)]
Fractional Pitch value 正規化自相關:
r (T  ) 
(1  )CT (0, T )  CT (0, T  1)
CT (0,0)[(1  ) 2 CT (T , T )  2(1  )CT (T , T  1)  2CT (T  1, T  1)]
對兩個候選值各別計算出的Fractional Pitch & Normalized Autocorrelation
value , 其中較大的作為current frame 的 fractional pitch , P 2 , r ( P 2) =Vbp1
10
Aperiodic Flag
1.
由 Bandpass Voicing Analysis 決定 Vbp1
if Vbp1 < 0.5 , Aperiodic Flag set 1
otherwise
2.
, Aperiodic Flag set 0
由旗標設定決定解碼器是否使用非週期性脈衝的激發源
11
Linear Prediction Analysis
1.
2.
用200個samples(25ms)的漢明窗對輸入語音加窗進行10階線性預測分析
採用Levinson-Durbin 求解線性預測系數 a i (i=1,2,…,10),然後對 a i 做
0.994(15Hz)帶寬擴展,也就是:
a i  0.94i a i (i  1,2,...,10)
Linear Prediction Residual Calculation
1.
輸入的語音信號經過線性預測分析後將10個LPC係數過濾後,為線性預測
殘值信號
Voice strength
LPC Aanlysis
LPC Residual
signal
Peakiness &
Adjust Vbp
Final Pitch
12
Peakiness Calculation
1.
線性預測殘值信號的峰度(peakiness)定義為:
1 160 2
 rn
160 n 1
peakiness 
1 160
 rn
160 n 1
2.
峰度值超過1.34 ,則 Vbp1 會被設定為1
峰度值超過1.6 ,則 Vbpi (i=1,2,3)全會設為1
13
Final Pitch Calculation
1.
將殘值信號經過截止頻率為1KHz的低通濾波器
2.
以 P 2 為基準,從前5個到後5個samples , 用 Normalized Autocorrelation 做
做Integer Pitch search
3.
找出optimum integer pitch lag 進行 Fractional Pitch Refinement , 得到的值
暫定為Final Pitch P3 & r ( P 3)
14
4.
之後經過Pitch Doubling Check 後 , 才會是準確的Final Pitch
15
no
r ( P 3)  0.6
yes
P3  Fractional ( P 2)
r ( P 3)  0.55
P3  100
yes
P3  Pavg
no
P3  100
Dth  0.7
yes
Dth  0.5
Dth  0.75
Doubling
Check P3
Dth  0.9
Doubling
Check P3
END
16
Gain Calculation
1.
輸入信號的每一音框分成兩個子音框,分別計算 G1 和 G 2
2.
計算增益的窗長會隨著P 2 變化而有所改變
3.
每個子音框的增益為RMS的分貝值計算, 計算公式為:
1 L 2
Gi  10 log [0.01   sn ]
10
L n 1
4.
式中0.01是防止RMS值太接近零,若計算結果為負值,則將結果設為0
17
QUANTIZATION
1.
Quantization of Prediction Coefficients
2.
Pitch Quantization
3.
Gain Quantization
4.
Bandpass Voicing Quantization
5.
Fourier Magnitude Calculation and Quantization
18
Quantization of Prediction Coefficients
1.
將10個線性預測係數轉化為 line spectrum frequencies (LSF's)
2.
10個LSF按照升冪排列,間隔至少為50Hz
3.
LSF向量用 multi-stage vector quantizer (MSVQ)進行量化
LSF-- f
1st stage
128 levels
2end Stage
64 levels
3 rd Stage
64 levels
4th Stage
64 levels

LSF-- f
19

The algorithm is to find the quantized vector - f and as seen in the above figure he is the sum
of the vectors selected in each stage. The main purpose of the MSVQ is to find the quantized
vector that will best represent the original LSF vector. In order to do so the MSVQ finds the
codebook vector, which minimize the square of the weighted Euclidean distance, d 2, between
the original LSF and the quantized LSF vectors:
20
Pitch Quantization
1.
2.
將Final Pitch value 進行99階平均量化
量化後對應於量化表中一個7bit 的 codeword.
21
Gain Quantization
1.
2.
每個Frame有兩個增益G1 和 G 2 ,
分別用3bit , 5bit 進行平均量化
G 2 的範圍10dB~77dB
22
Bandpass Voicing Quantization
1.
若VbP1  0.6 , 表示unvoiced , VbPi (i=2,3,4,5)量化為0
2.
若VbP1  0.6 , 且 VbPi (i=2,3,4,5)>0.6 , 則量化為1 , Otherwise 量化為 0
3.
有一特例, 若 VbPi (i=2,3,4,5) 為 0001 , 則將 VbP5 量化為 0
23
Fourier Magnitude Calculation and Quantization
1.
先根據量化的LSF向量計算出量化的線性預測參數
2.
利用量化的線性預測參數計算殘值信號
3.
用200sample的漢明視窗 補零後做512點的Fast Fourier Transform (FFT)
4.
將複數的FFT結果轉換成幅度值
5.
利用spectral peak-picking algorithm 搜尋 first 10 pitch harmonics
24
25
26
解碼器
Pitch Decoding
1.
2.
3.
decoding the 7-bit pitch code to determine if a frame is voiced, unvoiced, or
whether a frame erasure is indicated
If the pitch code is all-zero or has only one bit set, then the unvoiced mode is
used.
If two bits are set, a frame erasure is indicated. Otherwise, the pitch value is
decoded and the voiced mode is used.
If any erasure is detected in the current frame
All of the parameters for the current frame are replaced with the parameters
from the previous frame. In addition, the first gain term is set equal to the
second gain
27
28
Parameter Interpolation
1.
由於每個Frame只會傳送一組參數 , 考慮到一個Frame內可能不止有一
個pitch period,所以MELP的參數再合成時,都要進行pitch-synchronously .
29
Aperiodic Pulses
1.
由於MELP語音標準中,語音分成三種狀態 voiced , unvoiced , jitter voiced
2.
非週期脈衝激發源主要使用在voiced 和 unvoiced 語音交界, 用來合成
jitter voiced , 能使得解碼器產生不穩定的 glottal pulses.
30
Mixed Pulse and Noise Excitation
1.
利用multi-band mixing model ,使用分成五個頻帶的FIR band-pass filter
bank
2.
處理有聲成分的濾波器統稱為 Pulse Shaping Filter Bank
處理無聲成分的濾波器統稱為 Noise Shaping Filter Bank
3.
兩濾波器組會依據激發源每個頻帶的有聲和無聲傾向改變,將脈衝激發
源的訊號利用代通濾波器套用到有聲/無聲的頻帶
4.
將這五個頻帶的訊號合成便是所謂的混合激發源,利用這種方式可以大
幅改善傳統LPC參數模型嚴重的buzz雜音
31
32
33
Adaptive Spectral Enhancement
1.
由於合成的語音衰減速度會比自然情況的人聲還快 , 因此造成失真 ,
失真的原因是由於LPC pole bandwidth 所造成
2.
為了解決失真的問題 , 在混合激勵信號產生後,會經過自適應頻譜增強
濾波器濾波
3.
此濾波器為一個10階層極點零點(pole/zero)加強濾波器,加上一個一階
FIR濾波器進行補償
4.
其目的是減少有共振點的頻帶與真實語音間的誤差 , 以減緩共振點響
應衰減的速度
34