티스토리 뷰

반응형

ControlSpeech: Towards Simultaneous and Independent Zero-Shot Speaker Cloning and Zero-Shot Language Style Control


  • Speaking style control과 adjustment를 위한 Text-to-Speech model이 필요함
  • ControlSpeech
    • Speech prompt, content prompt, style prompt를 input으로 하여 bidirectional attention, mask-based parallel decoding을 통해 codec representation을 capture
    • Style Mixture Semantic Density module을 통해 textual style control의 many-to-many 문제를 해결
  • 논문 (ACL 2025) : Paper Link

1. Introduction

  • VoiceBox, NaturalSpeech2와 같은 zero-shot Text-to-Speech (TTS)와 PromptTTS와 같은 style-controllable synthesis를 활용하면 다양한 style의 음성을 합성할 수 있음
    • Zero-shot TTS의 경우 few-second speech prompt를 사용하여 unseen speaker voice를 cloning 하고, style-controllable TTS의 경우 textual description을 통해 prosody, accent 등을 control 함
    • BUT, 해당 방식들은 각각 다음의 한계가 있음:
      1. Zero-shot TTS의 경우 style이 fix 되어 있어 further control이 불가능함
      2. Style-controllable TTS의 경우 synthesized voice를 specify 할 수 없음
        - 즉, 기존의 TTS system은 content, timbre, style을 simultaneous, independent 하게 control 할 수 없음

Style Transfer, Voice Cloning, ControlSpeech 간의 비교

 

-> 그래서 content, timbre, style을 모두 control 할 수 있는 ControlSpeech를 제안

 

  • ControlSpeech
    • Controllable speech generation을 위해 pre-trained disentangled representation을 활용
      - 특히 encoder-decoder architecture를 기반으로 non-autoregressive codec generator를 integrate
    • Many-to-Many 문제를 해결하고 다양한 style을 mapping 하기 위해 Style Mixture Semantic Density Sampling (SMSD) module을 도입

< Overall of ControlSpeech >

  • Codec representation과 SMSD module을 활용한 style-controllable zero-shot TTS model
  • 결과적으로 기존보다 뛰어난 성능을 달성

2. Method

- Overall Architecture

  • ControlSpeech는 encoder-decoder architecture를 기반으로 함
    • 먼저 input content prompt, style prompt, speech prompt를 각각 encode 하기 위해 3개의 encoder를 사용함
      1. Content text는 phoneme으로 convert 되어 text encoder에 전달되고, style text는 special $\text{[CLS]}$ token을 prepend 하여 BERT tokenizer와 함께 word-level encoding 됨
      2. Speech prompt의 경우 NaturalSpeech3의 pre-trained codec encoder와 timbre extractor를 사용해 timbre information을 capture 함
    • Style Mixture Semantic Density (SMSD) module은 style text를 sampling 하여 해당 global style representation을 생성하고, text encoder의 text representation과 cross-attention module을 통해 combine 함
      - 이후 mask iteration, parallel generation을 기반의 non-autoregressive Conformer-based codec generator로 전달됨
    • Timbre extractor는 speech encoder output을 timbre attribute를 represent 하는 global vector로 convert 함
    • 결과적으로 ControlSpeech는 style description $X_{s}$, content text $X_{c}$, speech prompt $X_{t}$를 input으로 하여 해당 style codec $Y_{s}$, content codec $Y_{c}$, timbre embedding $Y_{t}$를 생성함
      - 해당 representation은 concatenate 된 다음 pre-trained codec decoder를 통해 speech로 upsampling 됨

Overview

- Decouple Content, Style, and Timbre

  • ControlSpeech는 pre-trained disentangled representation space를 활용하여 attribute decoupling을 수행함
    • 이때 codec disentangler, timbre extractor module로써 FACodec을 채택함
    • 먼저 training process에서 해당 codec encoder를 freeze 하여 target speech $Y$로부터 downsampled compressed audio frame $h$를 얻음
      1. Frame $h$는 disentangling quantizer module과 timbre extractor module을 통해 process 되어 original content codec $Y_{c}$, prosody codec $Y_{p}$, acoustic codec $Y_{a}$, timbre information $Y_{t}$를 derive 함
        - 이론적으로 content $Y_{c}$, timbre $Y_{t}$를 제외한 나머지 representation은 style codec $Y_{s}$로 취급됨
      2. 여기서 논문은 prosody $Y_{p}$와 acoustic $Y_{a}$를 channel dimension에서 concatenate 하여 style codec $Y_{s}$를 얻음:
        (Eq. 1) $Y_{s}=\text{concat}(Y_{p},Y_{a})$ 

- Codec Generation Process

  • First Stage
    • First stage는 paired text-speech data $\{X,Y_{codec}\}$을 기반으로 함:
      (Eq. 2) $ Y_{codec}=\text{concat}(Y_{s},Y_{c})=C_{1:T,1:N}\in\mathbb{R}^{T\times N}$
      - $X=\{x_{1},x_{2},x_{3},...,x_{T}\}$ : global stlye representation과 aligned text representation의 cross-attention fusion
      - $Y_{codec}$ : vector quantized speech representation
      - $T$ : downsampled utterance length, $N$ : 각 frame의 channel 수
    • 각 acoustic code matrix의 row-vector $C_{t,1:N}$는 frame $t$에 대한 $N$개 code를 represent 하고, 각 acoustic code matrix의 column-vector $C_{1:T,i}$는 $T$ length의 $i$-th codebook sequence를 represent 함
      - $i\in \{1,2,...,N\}$ 
    • ControlSpeech의 training process는 VALL-E를 따라 $i$-th channel $C_{1:T,i}$를 randomly select 함
      - $i$-th channel $P(C_{1:T,i}|X_{1:T};\theta)$의 생성을 위해 parallel decoder가 사용됨
    • 특히 cosine-schedule을 따라 codec level $i$에서 mask $M_{i}\in\{0,1\}^{T}$를 sampling 함
      1. 이때 $u'\sim \mathcal{U}\left[0,\frac{\pi}{2}\right]$의 masking ratio $p=\cos(u')$에 따라 sampling 하고, mask는 $M_{i}\sim \text{Bernoulli}(p)$를 따름
      2. $M_{i}$를 $i$-th level의 masked portion, $\bar{M}_{i}$를 $i$-th level의 unmasked portion이라고 하자
      3. 해당 portion $C_{1:T,i}$에 대한 prediction은 prompt $j\,\, (j<i)$ channel $C_{1:T,<i}$, target text $X_{1:T}$와 $i$-th channel $\bar{M}_{i}C_{1:T,i}$의 unmasked portion에 대한 concatenation을 기반으로 refine 됨
    • 결과적으로 해당 part에 대한 prediction은 $P(C_{1:T,i}|X_{1:T};\theta)=P\left(M_{i}C_{1:T,i}|C_{1:T,<i},X_{1:T},\bar{M}_{i}C_{1:T,i};\theta\right)$로 정의됨
  • Second Stage
    • Second stage는 AdaSpeech를 따라 previously obtained $Y_{codec}$과 global timbre embedding $Y_{t}$를 fuse 하는 conditional normalization layer를 사용하여 $Y'$을 생성함
      - 해당 $Y'$은 pre-trained codec decoder로 전달되어 final speech output $Y$를 생성함
    • 먼저 global timbre embedding $Y_{t}$를 input으로 하여 scale vector $\gamma$, bias vector $\beta$를 output 하는 2개의 simple linear layer $W_{\gamma},W_{\beta}$를 도입함
      1. 해당 lightweight learnable scale vector $\gamma$와 bias vector $\beta$는 $Y_{codec}$과 fuse 됨
      2. 결과적으로 해당 process는:
        (Eq. 3) $Y=\text{CodecDecoder}\left(W_{\gamma}Y_{t}\frac{Y_{codec}-\mu_{c}}{\sigma_{c}^{2}}+ W_{\beta}Y_{t}\right)$
        - $\mu_{c},\sigma^{2}_{c}$ : $Y_{codec}$의 hidden representation에 대한 mean/variance

- The Style Mixture Semantic Density (SMSD) Module

  • 논문은 style text description과 audio 간의 many-to-many 문제를 해결하는 것을 목표로 함
    • 즉, 서로 다른 style description은 동일한 audio sample에 해당할 수 있고 (many-to-one), single style description은 동일한 style을 가지는 multiple audio sample에 해당할 수 있음 (one-to-many)
      1. Many-to-One relation은 여러 text description이 동일한 speech style을 나타내기 때문에 발생함
      2. One-to-Many relation은 single text가 style의 varying degree를 capture 할 수 없기 때문에 발생함
    • 해당 many-to-many 문제를 해결하기 위해 논문은 Style Mixture Semantic Density (SMSD) module을 도입함
      - SMSD 내에서 pre-trained BERT를 사용하여 style description의 semantic representation $X'_{s}$를 추출하고, 서로 다른 style text를 동일한 semantic space에 align 하여 out-of-domain generalization을 향상함
    • 특히 one-to-many 문제의 경우 Mixture Density Network (MDN)과 closely align 되어 있음
      1. 따라서 semantic representation의 style $X'_{s}$를 particular style의 varying degree를 represent 하는 Gaussian distribution의 global mixture로 취급할 수 있음
      2. Training 시 각 independent Gaussian distribution은 해당 learnable weight로 multiply 된 다음, sum 됨
        - 이때 target audio의 style representation distribution과 summed mixture density distribution 간의 KL-divergence를 constraining 함으로써 style text와 target audio 간의 one-to-one mapping을 구성함
      3. 추론 시에는 style semantic distribution mixture에서 sampling을 수행하여 independent Gaussian distribution을 얻음
        - 여기서 각 sampled distribution은 동일한 style의 서로 다른 degree를 reflect 함
      4. 추가적으로 style control의 diversity를 향상하기 위해 SMSD의 MDN network에 noise perturbation module을 incorporate 함
        - 해당 noise perturbation module은 서로 다른 dimension에서 perturbation의 isotropy를 control 함
    • 먼저, style prompt length $L$에 대해 하나의 raw style prompt $X_{s}=[X_{1},X_{2},X_{3},...,X_{L}]$에 $\text{[CLS]}$ token이 prepend 되고 word embedding으로 convert 되어 BERT model에 전달됨
      1. $\text{[CLS]}$ token에 해당하는 hidden vector는 global style semantic representation $X'_{s}$로 볼 수 있고, subsequent module의 generation과 sampling을 guide 함
      2. 이후 MDN network를 기반으로 style semantic input representation $X'_{s}\in\mathbb{R}^{n}$을 covariate로 사용하여 target style representation $Y'_{s}\in\mathbb{R}^{d}$를 regress 함
        - $d,n$ : dimension
      3. Conditional distribution은 Gaussian distribution mixture로 modeling 됨:
        (Eq. 4) $P_{\theta}(Y'_{s}|X'_{s})=\sum_{k=1}^{K}\pi_{k}\mathcal{N}\left(\mu^{(k)},{\sigma^{2}}^{(k)}\right)$
        - $K$ : independent Gaussian distribution 수에 대한 hyperparameter
      4. $\pi_{k},\mu^{k}, {\sigma^{2}}^{(k)}$는 input style semantic representation $X'_{s}$를 기반으로 한 neural MDN network $f_{\theta}$의 output:
        (Eq. 5) $\pi\in\Delta^{K-1},\,\,\mu^{(k)}\in\mathbb{R}^{d},\,\,{\sigma^{2}}^{(k)}\in S^{d}_{+}=f_{\theta}(X'_{s})$
      5. Training 시 mixture weight의 sum은 neural network output $\alpha_{k}$에 softmax funxtion을 적용하여 $1$로 constraint 됨:
        (Eq. 6) $\pi_{k}=\frac{\exp(\alpha_{k})}{\sum_{k=1}^{K}\exp(\alpha_{k})}$
    • Style control을 further enhance 하기 위해 논문은 SMSD 내에 noise perturbation module을 도입함
      - 해당 noise perturbation module은 variance ${\sigma^{2}}^{(k)}$ 내의 서로 다른 dimension에 대한 perturbation $\varepsilon$의 isotropy를 regulate 함
    • 여기서 고려하는 perturbation은 다음과 같음:
      1. Fully Factored
        - $ {\sigma^{2}}^{(k)}=f_{\theta}(X'_{s})+f_{\theta}(\varepsilon )=\text{diag}\left({\sigma^{2}}^{(k)}\right)\in\mathbb{R}^{d}_{+}$
        - 각 dimension의 noise level을 separately predict 함
      2. Isotropic
        - $ {\sigma^{2}}^{(k)}=f_{\theta}(X'_{s})+f_{\theta}(\varepsilon )={\sigma^{2}}^{(k)}I\in \mathbb{R}_{+}$
        - 각 dimension $d$에 걸쳐 동일한 noise level을 가정함
      3. Isotripic Across Clusters
        - $ {\sigma^{2}}^{(k)}=f_{\theta}(X'_{s})+f_{\theta}(\varepsilon )=\sigma^{2}I\in\mathbb{R}_{+}$
        - 각 dimension $d$, cluster에 대해 동일한 noise level을 가정함
      4. Fixed Isotropic
        - Cluster 간에는 isotropic 하지만 $\sigma^{2}$을 학습하지 않음
    • 경험적으로 Isotropic Across Clusters가 accuracy, diversity 간의 balance를 맞추는데 가장 적합하므로, 논문은 이를 noise perturbation mode로 채택함
      - 이를 통해  Gaussian distribution mixture에 대한 robust mean, variance, weight parameter를 얻을 수 있음
    • 결과적으로 SMSD module의 training objective는 input $X'_{s}$에 대한 observation $Y'_{s}$의 negative log-likelihood로써, $\mathcal{L}_{SMSD}=-\log \text{sum}\exp_{k}\left(\log \pi_{k}-\frac{1}{2}\left|\left| \frac{Y'_{s}-\mu^{(k)}}{\sigma}\right|\right|\right)$

- Training and Inference

  • Training process에서 duration predictor는 Mean Squared Error loss $\mathcal{L}_{dur}$를 통해 optimize 되고, 이를 위해 논문은 Montreal Forced Aligner (MFA)를 사용하여 phoneme duration을 추출함
    • Codec generator module은 Cross-Entropy loss $\mathcal{L}_{codec}$를 통해 optimize 됨
      - 이때 optimization을 위해 channel이 randomly select 됨
    • SMSD module의 target style representation $Y'_{s}$는 style codec $Y_{s}$를 style extractor에 전달하여 얻어지는 global style representation과 같음
      1. 즉, training 시 ground-truth style representation $Y'_{s}$와 ground-truth duration을 codec generator와 duration predictor에 전달함
      2. 결과적으로 얻어지는 overall loss $\mathcal{L}$은:
        (Eq. 7) $\mathcal{L}=\mathcal{L}_{codec}+\mathcal{L}_{dur}+\mathcal{L}_{SMSD}$
    • 추론 시에는 original stylistic descriptor $X_{s}$를 BERT module에 input 하여 style semantic representation $X'_{s}$를 얻고, $X'_{s}$를 SMSD에 input 하여 $\pi,\mu,\sigma^{2}$을 얻음
      - 이때 $X'_{s}$를 directly sampling 함으로써 predicted style distribution을 derive 할 수 있음
    • 이후 논문은 predicted style을 text state에 incorporate 하고 confidence-based sampling scheme을 사용하여 discrete acoustic token을 iteratively generate 함 
      1. 먼저 multiple forward pass를 수행하여 각 iteration $j$마다 masked position의 candidate를 sampling 함
      2. 다음으로 $P_{j}$ candidate를 confidence score를 기반으로 retain 함
        - 이때 $P_{j}$는 cosine-schedule을 따름
      3. 최종적으로 timbre prompt를 condition normalization layer를 통해 integrate 하고 codec decoder에 전달하여 final speech output을 생성함 

3. Experiments

- Settings

- Results

  • 전체적으로 ControlSpeech의 성능이 가장 뛰어남

Model 성능 비교

  • Timbre cloning 측면에서도 우수한 성능을 보임

Timbre Cloning

  • Ablation Study
    • SMSD module을 제거하는 경우 성능저하가 발생함

Ablation Study

 

반응형
댓글
최근에 올라온 글
최근에 달린 댓글
«   2025/11   »
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