티스토리 뷰
Paper/Vocoder
[Paper 리뷰] End-to-End LPCNet: A Neural Vocoder with Fully-Differentiable LPC Estimation
feVeRin 2024. 7. 13. 11:00반응형
End-to-End LPCNet: A Neural Vocoder with Fully-Differentiable LPC Estimation
- Neural vocoder는 여전히 우수한 합성 품질에 비해 높은 computational complexity가 요구됨
- End-to-End LPCNet
- Linear prediction에 기반한 autoregressive model을 사용하여 neural vocoding의 complexity를 완화
- 추가적으로 frame rate network의 input feature에서 linear prediction cofficient를 예측하는 방법을 학습하여 기존 end-to-end version을 구성
- 논문 (INTERSPEECH 2022) : Paper Link
1. Introduction
- Vocoder는 acoustic parameter를 기반으로 intelligible speech를 합성하는 것을 목표로 함
- BUT, WaveNet, WaveRNN과 같은 기존 neural vocoder는 real-time 합성을 위해서는 강력한 GPU/CPU가 요구됨
- 한편 LPCNet은 WaveRNN을 기반으로 linear prediction (LP)와 source-filter model을 도입하여 고품질의 합성 성능을 유지하면서 3 GFLOPS의 computational cost를 줄일 수 있음
- BUT, LPCNet은 추론 시 acoustic feature로부터 LP coefficient를 explicit computation 해야 하는 한계점이 있음
- 결과적으로 arbitrary latent feature space를 사용하기 어려우므로 end-to-end coding이나 input이 full clean spectrum을 나타내지 않는 경우 사용하기 어려움
-> 그래서 기존 LPCNet의 explicit LPC computation을 회피하고 fully-differentiable 구성을 적용한 End-to-End LPCNet을 제안
- End-to-End LPCNet
- 기존 LPCNet을 개선하여 End-to-End differentiable LPCNet을 구성
- 이후 loss function으로부터 gradient를 backpropagating 하여 input feature를 통해 LPC estimation을 학습
< Overall of End-to-End LPCNet >
- Explict LPC computation을 회피하는 fully-differentiable LPCNet
- 결과적으로 LPCNet과 동일한 수준의 품질을 유지하면서 추론 속도를 개선
2. LPCNet Overview
- WaveRNN은 conditioning information으로부터 time
의 각 samplet 에 대한 discrete probability distribution function (PDF)st 와p(st) 까지의 past sample을 예측함st−1 - 구조적으로는 GRU를 기반으로 linear layer와 softmax activation을 적용해 distribution을 output 함
- 이때 GRU의 computational requirement를 줄이기 위해 block-sparse wegith matrix를 사용 - LPCNet은 linear prediction을 사용하여 WaveRNN을 simplify 함
- 먼저 LP coefficient
는 Levinson-Durbin Algorithm을 따라 input cepstral feature를 spectrum으로 변환하여 autocorrelation을 얻는 방식으로 explicitly compute 됨ai - 이후 얻어진 LPC는 previous sample에서 예측
를 계산하는 데 사용됨:pt
(Eq. 1)pt=∑Mi=1aist−i
- : prediction order (16kHz LPCNet의 경우M 을 사용)M=16
- : excitation/residualet=st−pt - 그러면 main GRU
는 past signalGRUA 뿐만 아니라 past excitationst−1 과 current sampleet−1 의 예측에도 사용할 수 있음pt
- 여기서 output은 excitation distribution 를 추정P(et)
- 먼저 LP coefficient
- 한편 full 16-bit PDF를 output 할 때 LPCNet은
-law scale을 채택하여 WaveRNN의 two-pass coarse-fine strategy를 회피함:μ
(Eq. 2)U(x)=sgn(x)⋅Umaxlog(1+μ|x|)log(1+μ)
- 여기서 -law rangeμ 이고Umax=128 ,μ=255 U(0)=0
- -law value는 일반적으로μ range의 양수값을 가지지만, 논문에서는[0,256] 을 가지도록 함[−128,128] -law scale은 quantization noise를 signal amplitude와 independent 하도록 만드는 역할μ - Input에 적용된 pre-emphasis filter
는 8-bitE(z)=1−αz−1 -law quantization에서 발생하는 audible quantization noise를 방지함μ - De-emphasis filter
는 synthesis output에 적용됨D(z)=11−αz−1
- 를 사용α=0.85
- Input에 적용된 pre-emphasis filter
- Frame rate network는 cepstral feature로부터 frame conditioning feature
를 학습함f
- Sample rate network는 frame conditioning feature 와 predictionf , past excitationpt , past signalet−1 을 기반으로 excitationst−1 에 대한 output probability distribution을 예측et
- 구조적으로는 GRU를 기반으로 linear layer와 softmax activation을 적용해 distribution을 output 함
3. End-to-End LPCNet
- End-to-End LPCNet은 LPC computation이 cepstral feature의 fixed set으로 hardcode 되지 않고 differentiable computation을 지원하는 것을 목표로 함
- 구조적으로는 아래 그림과 같이 frame rate network가 LPC를 계산하는데 사용됨
- 이때 fully-differentiable end-to-end training을 위해서는 다음을 differentiable 하게 구성해야 함:
- LPC Computation
- Input Embedding
- Loss Function Computation

- Learning to Compute LPCs
- LP coefficient는 error에 민감하고 unstable 하므로 directly quantize 하거나 estimate 할 수 없음
- Robust representation으로
interval 내에서 stability를 보장하는 Reflection Coefficient (RC)나 alternating ordering을 따르는 line spectral frequency를 고려할 수 있음[−1,1] - 따라서 논문에서는 representation으로 RC를 채택하여 사용함
interval이[−1,1] activation으로 쉽게 enforce 되고, pre-tanh logit이 RC의 log-area ratio representation과 동일하기 때문tanh - 여기서 RC는 Levinson recursion을 통해 direct-form LP coefficient로 변환됨:
(Eq. 3)a(i)j={ki,ifj=ia(i−1)j+kia(i−1)i−j,otherwise
- : RC,ki : ordera(i)j 의i -th prediction coefficientj - 결과적으로 (Eq. 1), (Eq. 3)은 differentiable 하므로 network는 RC를 계산하는 방법을 학습할 수 있음
- 추가적으로 End-to-End LPCNet은 frame rate network condition vector
의 첫f element를 RC로 directly use 함M
- 이를 통해 다음 sample rate network가 estimated prediction coefficient를 고려하도록 보장할 수 있음
- (Eq. 3)과 cepstral-to-LPC conversion은 전체 complexity에 비해 무시할 수 있으므로, 기본적으로 End-to-End LPCNet은 기존 LPCNet과 동일한 complexity를 가짐
- Robust representation으로
- Differentiable Embedding Layer
- Input
은 8-bitpt,st−1,et−1 -law value로 quantize 되어 input sample embedding을 학습하는데 사용됨μ - 이때 embedding은 input에 적용되는 non-linear function을 학습하여 singal value를 GRU에 대한 input으로 직접 사용하는 것에 비해 합성 품질을 크게 향상할 수 있음
- BUT, -law quantization은 gradient가 frame rate network의 RC computation까지 loss를 backpropagate 하는 것을 방지함μ - 따라서 논문은 embedding을 differentiable 하게 구성하기 위해, interpolation scheme을 도입함
- 먼저
를 embedding matrix의vj -th embedding vector라 하고,j 를 real-valued (unquantized)x -law sample value라고 하자μ - 그러면 interpolated embedding
는:v(i)(x)
(Eq. 4)f=x−⌊x⌋
(Eq. 5)v(i)(x)=(1−f)⋅v⌊x⌋+f⋅v⌊x⌋+1
- 이를 통해 gradient는 fractional interpolation coefficient 를 통해 propagate 될 수 있음f
- 먼저
- 추론 시에는 interpolation의 extra complexity를 회피하고,
를 계산함v(x)=v⌊x⌉
- : rounding operation⌊⋅⌉
- 이때 embedding은 input에 적용되는 non-linear function을 학습하여 singal value를 GRU에 대한 input으로 직접 사용하는 것에 비해 합성 품질을 크게 향상할 수 있음
- Loss Function
- 기존 LPCNet은 DNN training 이전에 excitation을 pre-compute 할 수 있지만, 논문의 End-to-End LPCNet에서 excitation은 DNN architecture의 일부로 계산됨
- 따라서 cross-entropy loss에 대한 ground-truth target은 constant 하지 않으므로 loss function에서 다음의 문제가 발생함
- Target
-law excitation을 quantize 하면 gradient가 RC computation으로 backpropagate 되지 않음μ -law scale의 non-linear nature로 인해 large excitation value는μ -law spacing이 크고 narrow excitation value의 경우 0에 가까운 값을 가짐μ
- 결과적으로 동일한 linear uncertainty라도 excitation이 크면 cross-entropy 값이 커질 수 있음
- Target
- 먼저 첫 번째 문제를 해결하기 위해 논문은 interpolated cross-entropy loss를 도입함
를 timee(μ)t 에서의 real-valuedt -law excitation이라고 하고,μ 를 timeˆP(e(μ)t) 에서 추정된 discrete probability라고 하자t - 여기서 앞선 interpolated embedding과 같이 standard cross-entropy 대신 nearest integer로 round 하면:
(Eq. 6)LCE=E[−logˆP(⌊e(μ)t⌉)] - 해당 loss는 다음과 같이 time에 따라 distribution의 기댓값을 취하여 probability를 interpolate 함:
(Eq. 7)f=e(μ)t−⌊e(μ)t⌋
(Eq. 8)ˆP(i)(e(μ)t)=(1−f)ˆP(⌊e(μ)t⌋)+fˆP(⌊e(μ)t⌋+1)
(Eq. 9)LICE=E[−log(ˆP(i)(e(μ)t))]
- : interpolation coefficientf
- 다음으로 두 번째 문제를 해결하기 위해서는 linear-domain excitation sample의 distribution에 해당하는 cross-entropy loss를 최소화해야 함
- 이는
을ˆP(i)(⋅) -law value와 1 차이에 해당하는 linear step size로 dividing 하는 것으로 수행될 수 있음μ - 이때
-law expansion functionμ 의 derivative로 나누어 compensated loss를 얻음:U−1(⋅)
(Eq. 10)LC=E[−logˆP(i)(e(μ)t)ddxU−1(x)|e(μ)t] 은 piecewise exponential 하므로, contant term을 discard 하여 (Eq. 10)을 단순화하면:U−1(⋅)
(Eq. 11)LC=LICE+E[|e(μ)t|log(1+μ)Umax]
- : (Eq. 9)의 interpolated cross-entropy lossLICE
- 오른쪽 term : -law companded excitation에서μ loss로L1 -law scale을 compensateμ
- 이는
- 따라서 cross-entropy loss에 대한 ground-truth target은 constant 하지 않으므로 loss function에서 다음의 문제가 발생함
- Regularization
- Compensated loss
만 사용하면 optimization이 발산하므로, training stability를 위해 논문은 다음의 3가지 regularization variant를 고려함LC RegularizationL1
- (Eq. 11)의
-law compensation에는μ loss가 이미 포함되어 있으므로 다음과 같이 compensation term을 artificially increase 하는 regularizer를 도입:L1
(Eq. 12)LL1=γE[|e(μ)t|log(1+μ)Umax]
- 여기서 을 사용해 (Eq. 11)의 compensation term을 두배로 늘림으로써 training을 stabilize 함γ=1 - 실제로 regularization은 standard LPC analysis와 유사한 방식으로 prediction error를 최소화함
- 특히 -law residual에 대한 연산은 regularization이 high-/low-amplitude signal에 거의 동일하게 적용되는 특성을 가짐μ
- (Eq. 11)의
- Log-Area Ratio Regularization
- 기존 LPCNet과 같이 ground-truth LPC에 대해 directly match 하는 방식을 고려할 수 있음
- 해당 regularization에서 LPC는 target speech signal에 대해서만 계산되고, training time에만 사용되므로 End-to-End LPCNet의 complexity를 증가시키지 않음 - 이때 추정된 RC
와 ground-truth RCki 간의 distance로써, 두 filter 간의 difference를 나타내는 log-area ratio (LAR)을 사용:k(g)
(Eq. 13)LLAR=E[∑i(log1−ki1+ki−log1−k(g)i1+k(g)i)2]
- 기존 LPCNet과 같이 ground-truth LPC에 대해 directly match 하는 방식을 고려할 수 있음
- Log-Area Ratio Matching
- (Eq. 6)의 non-compensated standard discrete cross-entropy를 사용하면서 LPC estimation을 adapt 하기 위해 (Eq. 13)을 적용하는 방식
- 이때 LPC는 output probability estimation을 고려하지 않고 ground-truth LPC와 match 되도록 함
- Excitation은 예측된 LP coefficient를 기반으로 계산됨
4. Experiments
- Settings
- Dataset : 9 TTS datasets
- Comparisons : LPCNet
- Results
- 여러 end-to-end variant에 대한 성능을 비교해 보면, LAR-regularized model이 ground-truth와 가장 비슷한 것으로 나타남


- MOS 측면에서도 LAR-regularized model이 가장 우수한 성능을 달성함


반응형