티스토리 뷰
Paper/TTS
[Paper 리뷰] EmoDiff: Intensity Controllable Emotional Text-to-Speech with Soft-Label Guidance
feVeRin 2024. 2. 14. 12:03반응형
EmoDiff: Intensity Controllable Emotional Text-to-Speech with Soft-Label Guidance
- 최신 Text-to-Speech 모델들은 고품질 음성을 합성할 수 있지만, emotion에 대한 intensity controllability는 떨어짐
- Intensity 계산을 위한 external optimization이 필요하기 때문 - EmoDiff
- Classifier guidance에서 파생된 soft-label guidance를 diffusion 기반 text-to-speech 모델에 적용
- Specified emotion과 Neutral을 emotion intensity
로 나타내는 soft-label을 활용α,1−α
- 논문 (ICASSP 2023) : Paper Link
1. Introduction
- Grad-TTS, VITS와 같은 최신 text-to-speech (TTS) 모델들은 좋은 합성 품질을 보이고 있지만, intensity controllable emotional TTS에는 어려움이 있음
- 일반적으로 Emotional TTS 작업은 categorical emotion label을 가지는 dataset을 활용하여 수행됨
- 이때 TTS 모델들은 학습 중에 emotion intensity value를 계산하는 것이 필요함
- 대표적으로 relatvie attribute rank (RAR)과 같은 방법이 있음
- Emotion embedding space를 통해 interpolating을 수행하여 intensity를 control 할 수도 있음
-> BUT, 분리된 학습 과정으로 인해 bias가 발생하여 여전히 낮은 합성 품질을 보임 - 이를 해결하기 위해 intensity에 따라 emotion weight를 control 하는 conditional sampling을 활용할 수 있음
- 특히 classifier guidance는 classifier의 graident를 사용하여 class label에 대한 sampling trajectory를 guide 할 수 있음
-> 그래서 classifier guidance와 diffusion model을 기반으로 한 soft-label guidance TTS 방식을 제시
- EmoDiff
- Soft-label guidance를 활용하여 intensity control이 가능한 emotional TTS 모델
- Emotion-unconditional acoustic model을 학습하고, emotion classifier를 모든 diffusion trajectory에 따라 학습시킴
- 추론 시에는 specified emotion과 neutral이
로 설정되는 soft emotion label을 사용하여 reverse denoising process를 guideα,1−α
< Overall of EmoDiff >
- Soft-label을 위해 emotion intensity를 classifier guidance에 대한 weight로 정의
- 추가적인 최적화가 필요 없고, classifier 측면에서 정밀한 intensity control이 가능
- 결과적으로 합성된 음성 품질의 저하 없이 다양한 intensity를 표현 가능
2. Diffusion Models with Classifier Guidance
- Denoising Diffusion Models and TTS Applications
- Denoising diffusion probabilistic model의 score-based interpretation에서,
- Diffusion model은 data 분포
를 알려진 분포p0(x0) 로 변환하기 위해 forward stochastic differential equation (SDE)를 정의pT(xT)
- 이때 해당하는 reverse-time을 통해 SDE는, noise에서 시작하여 sample을 합성하는 denoising process를 수행 - 이후 neural network는 score-matching objective를 사용하여 SDE trajectory의 모든
에 대해 score functiont∈[0,T] 를 추정∇xlogpt(xt) - 이를 통해 diffusion model은 GAN의 instablility와 mode collapse 문제를 해결하고 sample 합성의 다양성과 높은 품질을 보장 가능
- Diffusion model은 data 분포
- EmoDiff는 Grad-TTS를 기반으로 함
- Forward Process
- 먼저
를 mel-spectrogram의 frame이라 했을 때, forward SDE는:x∈Rd
(Eq. 1)dxt=12Σ−1(μ−xt)βtdt+√βtdBt
- : standard Brownian motionBt
- : SDE time indext∈[0,1]
- : noise schedule, (이때βt 는 increasing 하고βt )exp{−∫10βsds}≈0 - 그러면
를 얻을 수 있고, 해당 SDE는 conditional 분포p1(x1)≈N(x;μ,Σ) 를 따름xt|x0∼N(ρ(x0,Σ,μ,t),λ(Σ,t))
- 이때 는 모두 closed formρ(⋅),λ(⋅) - 따라서 diffusion model은
에서x0 를 직접 sampling 할 수 있음xt
- 실질적으로는 를 identity matrix로 설정하므로Σ 는λ(Σ,t) 가 됨λtI
- 이때 는 known closed formλt - 추가적으로 text에 대한 terminal 분포
을p1(x1) condition 함μ=μθ(y)
- : 해당하는 frame의 aligned phoneme representationy
- 먼저
- Reverse Process
- (Eq. 1)에 대응하는 reverse-time SDE는:
(Eq. 2)dxt=(12Σ−1(μ−xt)−∇xlogpt(xt))βtdt+√βtd˜Bt
- : 추정할 score function∇logpt(xt)
- : reverse-time Brownian motion~Bt - (Eq. 2)는 (Eq. 1)의 forward SDE와 분포
에 대한 trajectory를 share 함pt(xt)
- 따라서 (Eq. 2)를 에서 solve 하면, samplex1∼N(μ,Σ) 를 얻을 수 있음x0∼p(x0|y) - 이때 neural network
는 아래의 score-matching objective를 통해 score function을 추정하도록 학습됨:sθ(xt,y,t)
(Eq. 3)min
- (Eq. 1)에 대응하는 reverse-time SDE는:
- Forward Process
- Conditional Sampling Based on Classifier Guidance
- Denoising diffusion model은 conditional probability
를 modeling 하는 방법을 제공함 를 class label이라 하고, unconditional generative model 와 classifier 가 있다고 하자. 이때 Bayes formula에 의해:
(Eq. 4)- Diffusion framework가 conditional 분포
에서 sampling 하기 위해서는 score function 가 필요함
- 이때 classifier guidance를 통해 (Eq. 4)에 따라 classifier의 gradient를 unconditional model에 추가하는 것으로 문제를 해결할 수 있음 - 실적용에서 classifier gradient는 guidance strength를 control 하기 위해 scaling 됨
- 따라서 (Eq. 4)의 대신 를 사용
- : guidance level
- 가 클수록 class-correlated sample이 생성되고, 가 작을수록 sample variablity가 높아짐 - Guidance를 위한 classifer의 input은 (Eq. 1)을 따르는
를 사용함
- 이때 time index 는 내의 값을 따르므로 classifier는 와 같이 나타낼 수 있음
3. EmoDiff
- Unconditional Acoustic Model and Classifier Training
- EmoDiff는 unconditional acoustic model과 emotion classifier를 모두 학습해야 함
- 이때 emotional data에 대한 diffusion acoustic model을 우선적으로 학습하지만 emotion condition은 제공되지 않음
- Acoustic model은 Grad-TTS를 기반으로 하고 duration modeling을 위해 forced aligner를 통해 explicit duration sequence를 제공
- 해당 단계에서 training objective는
로 표현됨
- : logarithmic duration에 대한 loss
- : (Eq. 3)에 대한 diffusion loss - 추가적으로 Grad-TTS와 같이 prior loss
를 도입하여 모델의 수렴을 도움
- 학습이 완료되면 acoustic model은 input phoneme sequence
가 주어지면 와 같이 emotion label에 대해 unconditional 한 noisy mel-spectrogram 의 score function을 추정할 수 있음- 여기서 noisy mel-spectrogram
에서 emotional category 를 분류하기 위해서는 emotion classifier가 필요 - 따라서 classifier는 text condition
에 대해 로 공식화될 수 있음
- 결과적으로 classifier의 input은 SDE timestamp , noisy mel-spectrogram , phoneme-dependent Gaussian mean 로 구성됨 - 이때 classifier는 standard cross-entropy loss
로 학습됨
- 이를 위해 acoustic model parameter는 freeze 한 다음 emption classifier의 weight만 업데이트함
- 여기서 noisy mel-spectrogram
- 이때 emotional data에 대한 diffusion acoustic model을 우선적으로 학습하지만 emotion condition은 제공되지 않음
- Intensity Controllable Sampling with Soft-Label Guidance
- 우선 text
는 항상 필요한 condition이므로 notation을 단순화하기 위해 classifier를 라 하자 - Classifier guidance를 intensity에 따라 weight 된 emotion으로 control 할 수 있는 soft-label guidance로 확장하면
개의 basic emotion이 있고, 모든 basic emotion 가 의 one-hot vector form을 가진다고 하자
- 그러면 각 에 대해 -th dimension만 1을 가지고, Neutral을 위해 을 사용할 수 있음
- 따라서 에 대한 intensity 를 사용하여 weighted 된 emotion은 와 같이 정의할 수 있음- 결과적으로 classifier
에 대한 log-probability의 gradient는:
(Eq. 5)
- 이는 instensity 를 통한 의 sampling trajectory에 대한 emotion 의 contribution을 나타냄
- 따라서 가 크면 emotion 에 대해 강하게 force 된 trajectory를 따라 가 sampling 되고, 그렇지 않으면 Neutral 을 활용하여 sampling 됨 - 이를 기반으로 (Eq. 4)를 확장하면:
(Eq. 6)
- Intensity 가 1.0 (100% emotion ) 또는 0.0 (100% Neutral)인 경우 (Eq. 6)은 standard classifier guidance (Eq. 4)로 reduce 됨
- 결과적으로 sampling process에서 soft-label guidance (Eq. 5)를 사용할 수 있고, intensity 를 가지는 specified emotion 를 가지는 sample을 생성할 수 있음
- Intensity controllable sampling process을 위해
- Acoustic model을 통해 phoneme-dependent
sequence를 얻은 다음, 를 sampling 하고, numerical simulator를 사용하여 에서 까지의 reverse SDE를 계산 - 각 simulator 업데이트에서 classifier에 current
를 제공하여 output probability 를 얻은 다음, (Eq. 6)을 사용하여 guidance term을 계산
- 이때 guidance level 를 사용하여 guidance term을 확장 - 최종적으로 intensity
를 가지는 target emotion 에 해당하는 를 얻음
- 결과적으로 classifier probability와 correlate 되는 정확한 intensity를 활용할 수 있음
- Acoustic model을 통해 phoneme-dependent
- 제안된 soft-label guidance는 intensity control 외에도 mixed emotion에 대한 control이 가능함
가 에서의 모든 emotion combination을 나타낸다고 하면, (Eq. 5)는 다음과 같이 generalize 됨:
(Eq. 7)
- 그러면 (Eq. 6)도 마찬가지로 generalize 될 수 있고, probabilistic view에 따라 interpret 할 수 있음- 따라서 combination weight
는 basic emotion 에 대한 categorical 분포 으로 볼 수 있으므로, (Eq. 7)은 다음과 동치:
(Eq. 8)
(Eq. 9)
- : cross-entropy function - (Eq. 9)는 gradient
를 따라 sampling 할 때 target emotion 분포 와 classifier output 의 cross-entropy가 decreasing 한다는 것을 의미
- 따라서 cross-entropy의 gradient는 sampling process를 guide 할 수 있으므로, 해당 soft-label guidance를 통해 여러 basic emotion에 대한 weighted combination으로 complex emotion을 control 할 수 있음 - 추가적으로 intensity
를 사용하여 Neutral에서 target emotion 까지의 duration을 rescale 함
- 이를 위해 각 emotion class 에 대한 mean duration 를 계산하고,
- Output duration per phoneme을 로 rescale
- 따라서 phoneme duration도 주어진 intensity 에 따라 control 됨

4. Experiments
- Settings
- Dataset : Emotional Speech Dataset (ESD)
- Comparisons : Grad-TTS, MixedEmotion
- Results
- 합성 품질 측면에서 EmoDiff와 Grad-TTS가 가장 좋은 성능을 보임
- 특히 MixedEmotion과 비교하면 품질 차이가 두드러지는데, 이는 EmoDiff가 MixedEmotion과 달리 intensity controllability를 위해 sample quality를 손상하지 않는다는 것을 의미

- Emotion intensity에 따른 controllability를 비교하기 위해 classifier의 결과와 합성 품질을 비교
- Hard condition을 사용하는 Grad-TTS와 달리 EmoDiff는 soft-guidance를 사용하여 넓은 범위의 intensity를 control 가능

- Diversity에 대한 preference를 비교해 보면, anger/happy/surprise에 대해 EmoDiff가 가장 선호되는 것으로 나타남

반응형