티스토리 뷰

반응형

VITS2: Improving Quality and Efficiency of Single-Stage Text-to-Speech with Adversarial Learning and Architecture Design


  • Single-stage text-to-speech model은 기존의 two-stage 방식보다 더 우수한 합성 품질을 보이고 있지만, phoneme conversion에 대한 dependency와 computational efficiency 측면에서 개선이 필요함
  • VITS2
    • 기존의 VITS structure를 개선하여 보다 natural 한 음성 합성과 multi-speaker에서 더 나은 speaker similarity를 지원
    • Fully end-to-end single-stage approach를 통해 phoneme conversion에 대한 의존성을 제거
  • 논문 (INTERSPEECH 2023) : Paper Link

1. Introduction

  • Text-to-Speech (TTS)에서 input과 output은 수백 배의 time step difference를 가지므로, 고품질 합성을 위해서는 정확한 alignment가 중요함
    • 추가적으로 input text에는 포함되어 있지 않은 prosody나 speaker characteristic을 natural 하게 express 하고, 여러 가지 방식으로 말할 수 있게 하는 one-to-many 문제를 해결해야 함
      - 한편으로 TTS 모델에서는 효율적인 sampling 방식 또한 요구됨
    • 기존에는 이 문제들을 해결하기 위해 two-stage 방식을 주로 활용했음
      1. First stage에서는 input text로부터 liguistic feature나 mel-spectrogram 같은 intermediate representation을 생성하고, second stage에서는 해당 representation을 waveform으로 변환하는 방식
      2. BUT, two-stage 방식은 다음의 한계점이 존재함
        - First stage에서 second stage로 error propagation이 발생
        - Learned representation이 아닌 mel-spectrogram과 같은 human-defined feature를 사용함
        - Intermediate feature를 계산하는 과정이 consuming 함
    • 따라서 input text로부터 waveform을 직접 생성하는 single-stage TTS 방식들이 제안되었고, 대표적으로 VITS는 기존 two-stage 방식보다 더 뛰어난 합성 능력을 보이고 있음
      - BUT, VITS는 우수한 합성 품질에도 불구하고 intermittent unnaturalness, low efficiency, multi-speaker에서의 similairty 부족 등의 한계점이 있음

-> 그래서 기존 VITS의 naturalness와 efficiency를 더욱 개선한 VITS2를 제안

 

  • VITS2
    • Multiple speaker의 characteristic을 모델링하기 위해 speaker-conditioned text encoder를 도입
    • Transformer block을 활용해 normalizing flow를 개선
    • 추가적으로 adversarial learning을 통해 stochastic duration predictor를 학습

< Overall of VITS2 >

  • VITS의 duration predictor, normalizing flow, alignment, text encoder에 대한 개선 작업을 수행
  • 결과적으로 기존보다 뛰어난 품질과 추론속도를 달성

2. Method

  • 논문은 duration prediction, augmented variational autoencoder, alignment search, speaker-conditioned text encoder에 대한 개선을 수행함
    • 먼저 효율적인 duration predictor training을 위해 adversarial training을 도입
    • 이때 VITS2는 Monotonic Alignment Search (MAS)를 통해 alignment를 학습
    • 추가적으로 normalizing flow에서는 transformer block을 적용하여 distribution에 대한 long-term dependency를 capture 함
    • Speaker-conditioning은 multi-speaker TTS에서 similarity를 향상하기 위해 채택됨

Overall of VITS2

- Stochastic Duration Predictor with Time Step-wise Conditional Discriminator

  • VITS에서는 naturalness 향상을 위해 flow-based stochastic duration predictor를 도입함
    • BUT, flow-based method는 많은 computation이 필요해 낮은 efficiency를 보이므로 VITS2는 efficiency 향상을 위해 adversarial learning을 통한 stochastic duration predictor를 채택함
      1. 먼저 predicted duration을 discriminate 하기 위해, generator와 동일한 input을 제공하는 conditional discriminator를 사용하여 adversarial learning을 적용
      2. 이때 generator $G$의 input으로 text $h_{text}$와 Gaussian noise $z_{d}$의 hidden representation을 사용
        - 여기서 MAS로 얻어진 logarithmic scale duration $d$ 또는 duration predictor로 예측된 $\hat{d}$가 $h_{text}$와 함께 discriminator $D$의 input으로 사용됨 
      3. 일반적으로 discriminator에는 fixed length의 input이 제공되지만, VITS2에서 각 input token의 duration은 predict 되므로 각 training instance마다 input sequence length는 다름
        - 따라서 variable length의 input을 정확하게 discriminate 하기 위해 모든 token의 duration을 discriminate 하는 Time Step-wise Discriminator를 도입함
    • 여기서 adversarial learning을 위한 least-square loss와 mean squared error loss는:
      (Eq. 1) $L_{adv}(D)=\mathbb{E}_{(d,z_{d},h_{text})}\left[(D(d,h_{text})-1)^{2}+(D(G(z_{d},h_{text}),h_{text}))^{2}\right]$
      (Eq. 2) $L_{adv}(G)=\mathbb{E}_{(z_{d},h_{text})}\left[(D(G(z_{d},h_{text}))-1)^{2}\right]$
      (Eq. 3) $L_{mse}=\mathrm{MSE}(G(z_{d},h_{text}),d)$
      - 해당 adversarial training mechanism은 짧은 training step을 지원하므로 전체 computation time을 줄일 수 있음

- Monotonic Alignment Search with Gaussian Noise

  • MAS를 통해 모델은 alignment를 학습할 수 있음
    • 특히 MAS는 가능한 모든 monotonic alignment 중에서 가장 높은 probability의 text와 audio 간의 alignment를 산출하고, 모델은 해당 probability를 최대화하도록 training 됨
      - BUT, MAS는 특정한 alignment를 search 하고 optimize 하고 나면, 더 적합한 다른 alignment를 search 하는 것에 한계가 있음
    • 따라서 VITS2에서는 계산된 probability에 small Gaussian noise를 추가하여, 다른 alignment를 search 할 수 있도록 함
      1. 먼저 Glow-TTS에 따라, MAS에서 $Q$ value는 forward operation에서 가능한 모든 position에 대해 계산된 maximium log-likelihood를 가짐
      2. 이때 각 operation에서 계산된 $Q$ value에 small Gaussian noise $\epsilon$을 추가함:
        (Eq. 4) $P_{i,j}=\log \mathcal{N}(z_{j};\mu_{i},\sigma_{i})$
        (Eq. 5) $Q_{i,j}=\max_{A}\sum_{k=1}^{j}\log \mathcal{N}(z_{k};\mu_{A(k)},\sigma_{A(k)})=\max (Q_{i-1,j-1},Q_{i,j-1})+P_{i,j}+\epsilon$
        - $i,j$ : 각각 input seqeunce와 posterior의 specific position, $z$ : normalizing flow로 transform 된 latent variable
        - $\epsilon$ : standard Normal distribution에서 sampling 된 noise
        - Noise scale은 $0.01$에서 시작하여 각 step 마다 $2\times 10^{-6}$씩 decreasing 함

- Normalizing Flows using Transformer Block

  • 기존 VITS에서는 normalizing flow로 augment 된 variational autoencoder를 활용하여 고품질 합성을 지원함
    • 일반적으로 normalizing flow는 adjacent data의 pattern을 capture 하기 위해 convolution block을 활용하여 구성됨
      - 여기서 speech의 각 part는 adjacent 하지 않은 다른 part들과도 연관되어 있기 때문에 long-term dependency를 capture 하는 것도 중요함
    • BUT, convolution block은 adjacent pattern을 capture 하는 데는 효과적이지만 receptive field의 한계로 인해 long-term dependency에는 적합하지 않음
    • 따라서 논문은 long-term dependency capture를 위해 normalizing flow에 residual connection이 있는 small transformer block을 추가함
      - 이를 통해, 아래 그림과 같이 transformer block은 다양한 position에서 information을 collect 할 수 있음

Attention Score Map

- Speaker-Conditioned Text Encoder

  • Multi-speaker model은 speaker condition에 따라 각 speaker의 개별적인 speech characteristic을 express 할 수 있어야 함
    • 이때 speaker의 pronunciation, intonation 등은 speech characteristic에 큰 영향을 주지만 input text에는 포함되어 있지 않음
    • 따라서 논문은 speaker-conditioned text encoder를 도입하여 input text를 encoding 하는 동안 각 speaker의 speech characteristic을 학습할 수 있도록 함
      - 구조적으로는 text encoder의 3번째 transformer block에 speaker vector를 conditioning

3. Experiments

- Settings

  • Dataset : LJSpeech, VCTK
  • Comparisons : VITS, JETS

- Results

  • 먼저 naturalness와 speaker similarity 측면에서 VITS2는 기존보다 더 우수한 성능을 보임

모델 성능 비교

  • Ablation study 측면에서 각 component들이 대체되는 경우 성능 저하가 발생함

Ablation Study 결과

  • 기존의 single-stage 방식은 phoneme conversion에 대해 강한 dependency를 가지고 있음
    • 특히, normalized text는 actual pronunciation을 inform 하지 않기 때문에 정확한 pronunciation을 학습하기 어려움
    • 따라서 character error rate (CER) 측면에서 VITS와 VITS2를 비교해 보면, 제안된 VITS2가 더 뛰어난 성능을 보임
      - 특히 normalized text를 사용하더라도 VITS2는 phoneme sequecne 수준의 CER를 달성할 수 있음

CER 비교

  • 추가적으로 추론/학습 속도 측면에서도 VITS2는 기존대비 20.5%, 22.7%의 가속효과를 보임

추론/학습 속도 비교

 

반응형
댓글
최근에 올라온 글
최근에 달린 댓글
«   2024/09   »
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30
Total
Today
Yesterday