CONCSS: Contrastive-based Context Comprehension for Dialogue-appropriate Prosody in Conversational Speech Synthesis
in Seminar on Text-to-Speech
Yayue Deng, Jinlong Xue, Yukang Jia, Qifei Li, Yichen Han, Fengping Wang, Yingming Gao, Dengfeng Ke, Ya Li
Accepted by ICASSP2024
[Paper][Demo]
Goal
- Contrastive learning 기반의 CSS 프레임워크를 제안하여, context-sensitive representation을 만들고 dialogue-appropriate prosody를 가진 음성 생성
Motivations
- 기존 CSS 연구의 context encoder는 여전히 context representation를 잘 만들지 못한다
- Interpretability, representative capacity, context-sensitive discriminability가 부족
- 그래서 효과적이고 context-sensitive representation을 학습하기 위해서 contrastive learning을 활용
- unlabeled 대화 데이터 셋을 학습하고 context vector의 context sensitivity와 discriminability를 향상시킴
Contributions
- 논문의 언급으로는 CSS task에 처음 contrastive learning을 적용해서 self-supervised 방식으로 context understanding을 다뤘다고 함
- 다양한 distinct context representation을 잘 만들기 위해서 새로운 pretext task와 sampling strategy를 제안
Model Architecture
- Context encoder의 input으로 대화의 N개 utterance [($u_1$, $p_1$), ($u_2$, $p_2$), …, ($u_N$, $p_N$)] 사용하고 context vector $h_i$를 만듬
- $u_i$: utterance, $p_i$: speaker
- context vector $h_i$를 VITS에 활용하여 dialogue-appropriate prosody를 가진 음성 생성
- VITS 모델에 아래의 4가지를 추가한 구조
- pretext task와 context-dependent pseudo-label을 활용
- M2-CTTS의 textual and acoustic context encoder 구조를 그대로 활용 (아래 그림에 해당)
- Hard negative sampling을 활용해서 triplet loss를 적용
- Prosody BERT를 활용한 autoregressive prosodic modeling (APM) 모듈 사용
Methods
Context-aware Contrastive Learning
Pretask Definition
좋은 context understanding 능력을 가지고 있는 context encoder
⇒ 이전 문장들의 variation을 잘 감지하고 context마다 구별되는 적절한 representation을 만든다고 가정
contrastive learning을 위해 context-based pretext task를 아래와 같이 정의한다
- Ground truth sample ($h_i$)
- anchor sample
- Positive sample ($h^p_i$)
- context encoder의 input이 same dialogue(길이만 달라짐)인 경우
- output ⇒ $h^p_i$
- Negative sample ($h^n_i$)
- context encoder의 input이 different(non-overlapping) dialogue인 경우
- output ⇒ $h^n_i$
context encoder가 생성한 context vector는 아래의 기준을 만족해야 한다
- $D(\cdot)$: squared Euclidean distance in the context representation space
- GT sample이 Negative sample보다 Positive sample이랑 더 가깝게
- Ground truth sample ($h_i$)
Sampling Strategy
- hard negative sample을 고려하기 위해 두 가지 방법으로 negative sample을 만든다
Intra-speaker classes
같은 speakers, 완전히 다른 context ⇒ hard negative samples
context variation이 매우 달라도 상관없이 같은 speaker들로 이루어진 대화는 비슷한 speaker-related prosody를 생성하는 경향이 있음
Inter-speaker classes
다른 speakers, 완전히 다른 context ⇒ negative samples
Multi-modal Context Comprehension with Triplet Loss
context vector의 context-sensitive discriminability를 향상시키기 위해서, triplet loss를 통해서 positive pairs의 유사도는 최대화하고 negative pairs의 유사도는 최소화한다
- $m$: margin parameter
각각 Textual and acoustic modality별로 batch단위로 각 loss의 평균으로 계산
- $H_{audio}$: acoustic context vector, $H_{text}$: textual context vector
$L_{contra}$를 최소화하는 것이 아래 (5)식을 만족하도록 context encoder를 학습하는 것이다
- $\tau$: 모든 가능한 triplet을 포함하는 training set
Contrastive learning을 통해 context encoder는 context variation을 잘 반영할 수 있는 representation을 만들 수 있고, 이 representation을 CSS task에 transferring knowledge로 사용한다
Autoregressive Prosodic Modeling (APM)
- Fluent and natural prosody를 위해 APM모듈을 사용
- Current latent prosody vector인 $LPV_{i+1}$를 만들때 word-level의 prosody information과 이전의 latent prosody vectors인 $LPVs$를 모두 고려한다
- Attention mechanism, Prosody BERT 활용
- ProsoSpeech의 LPV predictor를 참고했다고 언급 (아래 그림은 ProsoSpeech의 architecture)
Experiment Setup
- open-source Chinese conversational speech corpus
- 10 hours transcribed Mandarin conversational speech
- 30 speakers on certain topics
- ffmpeg toolkit을 사용해서 dialouge들을 distinct audio clip으로 다 자르고 non-lexical noise들을 제거
- 전처리후 데이터는 9.2 hours
- CSS의 backbone으로는 VITS를 활용
- Biaobei Chinese TTS dataset으로 pretrain, 5k steps
- pretraining 후에 Chinese conversation 데이터 셋으로 다시 학습, 20k steps, batch size: 16
- APM 모듈에서 사용한 Prosody BERT는 Biaobei data의 word-level prosodic annotation으로 fine-tuning
- 비교 모델 및 평가 metric은 아래와 같다
Results
Comparison of Dialogue-Appropriate Prosody
- multi-modal setting의 MOS가 uni-modal의 MOS보다 좋음 ⇒ acoustic context, textual context 둘 다 고려하는 것이 효과적
- 제안하는 모델(S4)의 MOS가 가장 높고 Mel loss, Log F0 RMSE, MCD 지표에서도 제일 좋은 성능
- S1과 S2 비교 ⇒ triplet loss를 적용하는 것이 prosody performance 향상에 효과적
- S1과 S3 비교 ⇒ hard negative sampling strategy가 prosody performance 향상에 효과적
- S3과 S4 비교 ⇒ APM 모듈을 활용하는 것이 prosody 향상에 효과적
- Real과 Fake 차이가 클수록 context-sensitive
- Contrastive-based approach가 다른 context에 더 sensitive한 것을 추론할 수 있다
Comparison of Context-sensitive Distinctiveness
- 다른 context modeling 방법을 사용했을때 context vector의 discriminability를 비교한 실험 context vector들의 distance를 시각화함
- (a): M2CTTS는 context vector를 history context보다 current text를 기반으로 context vector를 생성하는 것을 확인할 수 있음
- (c), (d): context-sensitive discriminative capability를 보여줌 ( (a), (b)와 비교 )
Conclusion
- contrastive-based CSS framework인 CONCSS를 제안함
- Contrastive learning을 통해 context variation을 잘 반영하는 context latent representation을 만들고, 이를 speech synthesis에 활용해서 speech의 prosodic expression을 향상시킬 수 있다
- 논문에서 제안하는 방법들이 context comprehension을 향상시키고 well-representative context vector를 생성해서 more appropriate and context-sensitivity prosody를 가진 음성 생성을 가능하게 함
References
- Y. Deng et al. “CONCSS: Contrastive-based Context Comprehension for Dialogue-appropriate Prosody in Conversational Speech Synthesis.”, ICASSP, 2024.
- Kim, Jaehyeon, Jungil Kong, and Juhee Son. “Conditional variational autoencoder with adversarial learning for end-to-end text-to-speech.”, PMLR, 2021.
- D. Jacob et al.,”Bert: Pre-training of deep bidirectional transformers for language understanding.”, NAACL-HLT, 2018.
- J. Xue et al, “M2-CTTS: End-to-End Multi-Scale Multi-Modal Conversational Text-to-Speech Synthesis.”, ICASSP, 2023.
- Y. Ren et al, “Prosospeech: Enhancing prosody with quantized vector pre-training in text-to-speech.” ICASSP, 2022.
- G. Haohan et al, “Conversational end-to-end tts for voice agents.”, SLT, 2021.