티스토리 뷰
Paper/TTS
[Paper 리뷰] PromptStyle: Controllable Style Transfer for Text-to-Speech with Natural Language Descriptions
feVeRin 2024. 4. 12. 10:32반응형
PromptStyle: Controllable Style Transfer for Text-to-Speech with Natural Language Descriptions
- Text-to-Speech에서 style control을 위해서는 개별적인 style category가 있는 expressive speech recording이 필요함
- BUT, 실적용에서는 target style에 대한 referecne speech 없이 desired style에 대한 text description을 활용하는 것이 더 적합하다고 볼 수 있음
- PromptStyle
- Text prompt-guided cross-speaker style transfer를 목표로 VITS와 cross-modal style encoder를 활용
- 특히 cross-modal style encoder는 two-stage training을 통해 stylistic, semantic representation에 대한 shared space를 construct 함
- 논문 (INTERSPEECH 2023) : Paper Link
1. Introduction
- Text-to-Speech (TTS)에서 특정 speaker에 대한 stylistic speech를 생성하기 위해서는 고품질의 expressive speech recording이 필요함
- 따라서 speaking style이 부족한 target speaker에 대한 expressive speech를 생성하기 위해, cross-speaker style transfer를 활용할 수 있음
- 일반적으로 style representation을 위해 pre-defined style ID category index나 reference signal에서 추출된 hidden variable을 활용
- BUT, ID 방식은 fixed discrete category로 제한되어 flexibility가 떨어지고, reference 방식은 style representation이 uninterpretable 하다는 문제가 있음 - 특히 Style transfer TTS의 실적용을 위해서는 textual content에 대한 적절한 reference를 선택할 수 있어야 함
- 대표적으로 PromptTTS는 style expression을 guide 하기 위해 5가지 factor에 대한 style prompt를 활용
- 이러한 natural language description은 prior acoustic knowledge가 필요하지 않기 때문에, user-friendly 하게 desired style을 반영할 수 있음
- 따라서 speaking style이 부족한 target speaker에 대한 expressive speech를 생성하기 위해, cross-speaker style transfer를 활용할 수 있음
-> 그래서 target speaker에 대한 expressive data가 거의 없을 때, text prompt를 사용하여 style transfer TTS를 수행할 수 있는 PromptStyle을 제안
- PromptStyle
- Natural language description prompt를 활용하여 source speaker의 style을 expressive speech data가 없는 target speaker의 style로 transfer 하는 것을 목표로 함
- 이때 text prompt를 활용하여 style appearance를 모델링하는 two-stage procedure를 활용
- First stage에서는 VITS를 기반으로 style encoder를 사용해 TTS system의 condition으로 reference speech에서 style hidden representation을 추출
- Second stage에서는 style prompt에서 embedding 된 style을 모델링하기 위해 prompt encoder를 적용
< Overall of PromptStyle >
- Natural language description을 사용하여 cross-speaker style transfer를 수행하는 TTS 모델
- 제안하는 two-stage approach는 reference-based style transfer TTS를 모델을 training 한 다음, prompt encoder와 acoustic model을 fine-tuning 하는 방식
- 결과적으로 flexible text prompt로 cross-speaker style transfer를 효과적으로 수행하면서, 우수한 합성 품질을 달성
2. Method
- Model Overview
- PromptStyle은 style encoder, prompt encoder, TTS model의 세 부분으로 구성됨
- PromptStyle의 TTS model은 phoneme sequence를 waveform으로 직접 변환하는 VITS를 기반으로 함
- VITS는 end-to-end 방식으로 동작하므로 acoustic model과 vocoder 간의 mismatch 없이 고품질의 음성을 생성할 수 있음 - Style encoder는 reference speech에서 style information을 추출하는 데 사용되고, prompt encoder는 natural language description에서 semantic information을 추출하는데 사용됨
- 이때 text prompt에서 style transfer를 수행하기 위해 two-stage training procedure를 도입
- First stage에서는 style embedding space 학습을 목표로 speaker annotation이 포함된 multi-style expressive data를 사용하여 style encoder를 포함한 VITS를 training 함
- Second stage에서는 natural language description prompt가 포함된 expressive speech를 사용하여 전체 모델을 fine-tuning 함
- 이를 통해 style embedding space와 semantic embedding space 간의 relationship을 construct 하여 text prompt로 style transfer를 수행할 수 있음
- First stage에서는 style embedding space 학습을 목표로 speaker annotation이 포함된 multi-style expressive data를 사용하여 style encoder를 포함한 VITS를 training 함
- PromptStyle의 TTS model은 phoneme sequence를 waveform으로 직접 변환하는 VITS를 기반으로 함
- Cross-modal Style Encoder
- Cross-modal style encoder는 style encoder와 prompt encoder로 구성되어 stylistic, semantic representation의 shared space를 construct 함
- Style encoder는 mel-spectrogram에서 style information을 추출
- Linear spectrogram에는 너무 많은 information이 포함되어 있어 오히려 style information을 capture 하는데 방해되기 때문 - 이때 style encoder는 reference encoder와 auxiliary adversarial component로 구성됨
- Reference encoder는 Global Style Token (GST) discarding style token과 유사한 구조를 가짐
- Auxiliary adversarial component는 speaker, style information을 disentangle 하기 위해, gradient reversal layer, feed-forward layer, speaker classifier로 구성됨
- 결과적으로 style encoder는 style annotation이 없는 대량의 expressive speech로부터 style transfer를 위한 style embedding space를 구축하는 것을 목표로 함
- Prompt encoder는 natural language description을 통해 controllable style transfer를 위한 prompt embedding space를 구축하는 데 사용됨
- 구조적으로 prompt encoder는 pre-trained BERT와 adapter layer로 구성
- 먼저 BERT에 text prompt가 input 되어 semantic feature를 추출하고,
- Adapter layer는 semantic feature를 style encoder의 style embedding과 동일한 size의 prompt embedding으로 변환한 다음,
- Prompt embedding과 style embedding space 간의 relationship을 capture 함
- Style encoder는 mel-spectrogram에서 style information을 추출
- Training and Inference
- Text prompt가 있는 style transfer TTS를 수행하기 위해, two-stage training procedure를 도입함
- 이러한 bi-modal training approach는 아래의 2가지 장점이 존재
- Style과 prompt space 간의 relationship을 설정함으로써, reference speech나 text description을 사용하여 style transfer를 control 할 수 있음
- Annotated data의 type이나 scale은 실제 domain requirement에 따라 결정될 수 있고, fine-tuning process를 통해 time-saving이 가능함
- STAGE 1 : Style transfer by referecne Mel
- First stage에서는 reference speech를 통한 style transfer system을 활용함
- Style transfer를 위한 VITS의 각 module의 역할은 다음과 같음
- Text encoder는 style, speaker information과 관계없이 input phoneme을 처리
- Normalizing flow는 prior distribution의 flexibility를 향상
- Stochastic duration predictor는 text embedding으로부터 phoneme duration을 추정
- Posterior encoder는 linear sepctrogram에서 normal posterior distribution을 생성
- Decoder는 latent variable $z$를 spectrogram으로 reconstruct - 이때 duration은 style에 있어 중요하게 사용되므로, stochastic duration predictor의 input에는 style embedding을 추가함
- Normalizing flow의 경우 simplicity를 위해 Jacobian determinant를 사용한 volume-preserving transformation으로 설계하고, global conditioning을 통해 style embedding을 추가함 - 결과적으로 first stage의 loss로써 SSIM loss $L_{ssim}$을 추가하고, adversarial component의 speaker classifier는 gradient inversion을 사용한 cross-entropy loss $L_{adv}$로 training 됨:
(Eq. 1) $L_{stage1} =L_{vits}+L_{ssim}+L_{adv}$
- First stage에서는 reference speech를 통한 style transfer system을 활용함
- STAGE 2 : Style transfer by text prompt
- Second stage에서는 text prompt를 통해 controllable stye transfer를 수행하는 것을 목표로 함
- 이를 위해 prompt encoder를 사용하여 natural language description에서 prompt embedding을 추출하고,
- Prompt embedding은 cosine similarity $L_{cons}$를 사용하여 style embedding을 학습 - Cosine similarity loss는 prompt encoder 최적화뿐만 아니라 TTS model을 training 하는 데에도 사용됨
- 이때 BERT의 마지막 attention layer만 training 하고 style encoder의 parameter는 frozen 됨 - 결과적으로 second stage의 loss는:
(Eq. 2) $L_{stage2} = L_{vits}+L_{cons}$
- Second stage에서는 text prompt를 통해 controllable stye transfer를 수행하는 것을 목표로 함
- 이러한 bi-modal training approach는 아래의 2가지 장점이 존재
3. Experiments
- Settings
- Dataset : Mandarin Chinese Speech corpus (internal)
- Comparisons
- CST-TTS : cross-speaker transfer model
- GST-MLTTS : cross-speaker emotion transfer model - Ablations : 아래 표 참고
- Results
- Subjective Evaluation
- MOS 측면에서 PromptStyle은 음성 품질, speaker similarity, style similarity 모두에서 더 나은 성능을 보임
- End-to-End 구조와 다양한 module에 condition으로 추가된 speaker embedding 때문
- Objective Evaluation
- Style embedding space를 t-SNE로 시각화해 보면, PromptStyle이 style embedding 추출에 있어 가장 뛰어난 것으로 나타남
- 동일한 category의 style embedding이 함께 cluster 되어 있고, 서로 다른 category는 다른 cluster로 명확하게 떨어져 있기 때문
- Ablation Study
- Style embedding과 speaker embedding의 영향을 확인하기 위해 ablation study를 수행해 보면
- M1은 target speaker의 timbre는 잘 유지하지만 style transfer는 잘 수행하지 못함
- M2와 M1을 비교해 보면, normalizing flow에 style, speaker embedding을 모두 condition으로 제공하는 경우 style representation을 추출하기 어렵다는 것으로 나타남
- PromptStyle과 M2를 비교해 보면, VITS decoder에 speaker embedding을 추가하면 더 다양한 speaker timbre를 capture할 수 있는 것으로 나타남
- M3와 PromptStyle을 비교해 보면, posterior encoder에 style embedding을 추가하는 것이 expressiveness를 향상하는데 도움이 되는 것을 확인할 수 있음
- Style Control by Text Prompt
- Text prompt를 통한 PromptStyle의 성능을 확인해 보기 위해 ABX preference test를 수행
- 결과적으로 reference와 합성된 음성 간의 preference 차이는 없는 것으로 나타남
- 즉, PromptStyle은 품질의 저하 없이 효과적으로 text prompt의 style을 반영할 수 있음
반응형
'Paper > TTS' 카테고리의 다른 글
댓글