상세 컨텐츠

본문 제목

[논문 리뷰 스터디] Conditional Variational Autoencoder with Adversarial Learning forEnd-to-End Text-to-Speech (2)

심화 스터디/논문 리뷰 스터디

by 빵지0 2023. 5. 30. 16:09

본문

17기 안영지

 

이 논문은 텍스트를 입력으로 받아서 음성을 생성하는 End-to-End Text-to-Speech (TTS) 모델을 제안하는 논문입니다. 이 논문에서는 Conditional Variational Autoencoder (CVAE)와 Adversarial Learning을 결합하여 TTS 모델을 학습합니다.

 

1. Introduction

Text-to-speech(TTS)는 주어진 글을 발화로 바꾸는 시스템이다. FastSpeech 2s나 EATS는 end-to-end 시스템이었으나 두 단계로 나뉜 모델들보다 성능이 좋지 않았다. 본 논문에서는 두 단계로 이루어진 모델들보다 뛰어난 parallel end-to-end TTS를 소개하고, Variational autoencoder(VAE)를 이용해 TTS의 두 모듈을 연결했다. 좋은 품질의 발화음성을 생성하기 위해 conditional prior distribution에 normalizing flow를 적용하고, waveform 영역에서 adversarial training을 적용했다. Audio를 잘 만들기 위해서는 주어진 문장이 다양하게 발화될 수 있도록 one-to-many를 할 수 있어야 한다. 이를 해결하기 위해 stochastic duration predictor를 이용했다.

 

2. Method

Variational Inference

  1. Overview

VITS는 log-likelihood ELBO를 최대화하는 conditional VAE라고 표현할 수 있음

raw waveform 대신 mel-spectrogram xmel을 이용해 reconstruction loss를 사용.

디코더로 latent variables z를 waveform domain y^으로 upsampling한 후, y^을 mel-spectrogram domain xmel^로 변환

Reconstruction loss는 predicted mel-spectrogram과 target mel-spectrogram 사이의 L1 loss임

  1. KL-Divergence

Alignment Estimation

  1. Monotonic alignment search

입력 문장과 목표로 하는 발화 간의 alignment A를 측정하기 위해 Monotonic Alignment Search(MAS)를 사용

MAS는 normalizing flow f를 사용해서 data의 likelihood를 최대화하는 방법.

log-lokelihood가 아닌 ELBO를 사용하기 때문에 MAS를 그대로 사용하는 것은 어렵기에, ELBO를 최대화하는 방식으로 MAS를 수정해 사용함

      2. Duration prediction from text

계산된 alignment를 이용해 sum함으로써(∑jAi,j) input token di의 duration을 계산할 수 있음

사람이 한 것 같은 발화를 만들기 위해 stochastic duration predictor를 설계함.

Stochastic duration predictor는 maximum likelihood estimation을 기반으로 학습된 flow-based 모델.

하지만 maximum likelihood estimation을 바로 적용하는 것은 어려움. → 각 input의 duration이 discrete integer이기 때문에 continuous normalizing flow에서 사용하기 위해서는 dequantization이 필요하고, scalar이기 때문에 high-dimensional transformation을 할 수 없기 때문

이를 해결하기 위해 variational dequantization과 variational data augmentation을 적용 → duration sequence d와 같은 time resolution과 dimension을 가지고 있는 random variables u,v,를 만듦

u의 범위를 [0,1)[0,1)로 제한해 d−u가 positive real number가 되도록 하고, v,d를 channel-wise하게 concatenate해서 higher dimensional latent를 표현할 수 있게 함

최종 phoneme duration의 log-likelihood의 lower bound는 위와 같다.

 

3.Adversarial training

Adversarial training을 위해 the least-squares loss를, generator의 학습을 위해 additional feature matching loss를 사용함

VAE와 GAN 훈련의 조합으로, 조건부 VAE 훈련의 총 손실은 다음과 같이 표현됨

Model Architecture

  1. Posterior encoder

Posterior encoder에는 WaveGlow와 Glow-TTS에 사용된 non-casual WaveNet residual blocks을 사용

WaveNet residual block은 gated activation unit과 skip connection이 포함된 dilated conv로 이루짐

그 뒤의 linear projection layer는 normal posterior distribution의 mean과 variance를 계산

  1. Prior encoder

Prior encdoer는 input phonemes ctext와 normalizing flow fθ를 다루는 text encoder로 구성

Text encoder는 absolute positional encoding 대신, relative positional 표기방법을 사용하는 transformer encoder

이를 통해 ctext에서 htext를 얻을 수 있음

Normalizing flow는 affine coupling layers로 이루어져있는데, 이를 단순하게 하기 위해 Jacobian determinant를 사용해 normalizing flow를 volume-preserving transformation함

  1. Decoder

Decoder는 Hifi-GAN의 generator를 사용. transposed convolution과 multi-receptive field fusion (MRF) 모듈을 쌓아서 사용한 모델임. multi-speaker의 경우에 speaker embedding을 변형하여 input latent variable z에 더하게 됨.

  1. Discriminator

Hifi-GAN의 multi-period discriminator의 discriminator의 구조를 따라함

input waveform의 여러 periodic pattern을 고려.

  1. Stochastic duration predictor

Stochastic duration predictor는 htext로부터 phoneme duration을 계산

Dilated하며 depth-separable한 conv layers로 residual block를 쌓았고, neural spline flows를 적용함

Neural spline flows는 비슷한 수의 파라미터로 affine coupling layer보다 transformation expressiveness를 향상시킴


참고: https://sofar-sogood.tistory.com/entry/VITS-Conditional-Variational-Autoencoder-with-Adversarial-Learning-forEnd-to-End-Text-to-Speech-arXiv-21

https://music-audio-ai.tistory.com/22

관련글 더보기

댓글 영역