티스토리 뷰
Paper/Conversion
[Paper 리뷰] NANSY++: Unified Voice Synthesis with Neural Analysis and Synthesis
feVeRin 2025. 5. 6. 08:42반응형
NANSY++: Unified Voice Synthesis with Neural Analysis and Synthesis
- 대부분의 voice synthesis model은 annotated label과 pair 되는 audio data가 필요함
- NANSY++
- Annotated paired audio data 없이 self-supervised manner로 backbone network를 training
- Training 이후 각 voice application에 맞는 analysis feature를 partially modeling 하여 사용
- 논문 (ICLR 2023) : Paper Link
1. Introduction
- Glow-TTS, Diff-TTS와 같은 기존 voice synthesis model은 labeled annotation (text, music score 등)을 input으로 하여 acoustic model을 통해 mel-spectrogram을 생성한 다음, vocoder를 통해 waveform으로 변환함
- BUT, 해당 방식은 acoustic model, vocoder 간의 training/inference mismatch로 인해 synthesis quality의 한계가 있음
- 이를 위해 EATS, VITS와 같은 end-to-end training을 고려할 수 있지만 training cost가 크다는 단점이 있음 - 특히 training strategy와 관계없이 기존 synthesis model은 desirable control feature가 single mid-level representation에 entangle 되어 있고, 개별적인 application에만 특화되어 있음
- 이때 unified framework를 구성하기 위해서는 다음을 만족해야 함:
- Data-Scalable
- 다양한 unlabeled data를 활용하면서 최소한의 labeled dataset으로 training 되어야 함 - Modular
- 각 application에 대한 universal parameterized synthesizer를 통해 modularized way로 사용되어야 함 - High-Quality
- Modularized training을 사용하더라도 speech quality의 저하가 발생하지 않아야 함
- Data-Scalable
- BUT, 해당 방식은 acoustic model, vocoder 간의 training/inference mismatch로 인해 synthesis quality의 한계가 있음
-> 그래서 위를 만족하는 unified voice synthesis model인 NANSY++를 제안
- NANSY++
- Self-supervised fundamental frequency $F_{0}$ estimation training을 통해 post-processing, synthetic dataset에 대한 의존성을 제거
- NANSY framework를 기반으로 information perturbation과 bottleneck의 self-superivsed method를 적용하여 disentangled representation을 추출
- Training 중에 unseen target speaker의 timbre information을 capture 하는 content-dependent time-varying speaker embedding을 도입
- 추가적으로 human voice production model의 inductive bias를 적용하여 high-quality synthesis framework를 구성
< Overall of NANSY++ >
- Self-supervised method에 기반한 unified voice synthesis model
- 결과적으로 다양한 application에 대해 기존보다 우수한 합성 성능을 달성
2. Method
- Self-Supervised Learning of Pitch
- Pitch를 fundamental frequency $F_{0}$로 represent 하면 explicit control이 가능함
- 추가적으로 $F_{0}$에 의해 만들어진 sinusoidal signal을 synthesizer의 input으로 사용하면 glitch를 reduce 할 수 있음
- 이때 논문은 self-supervised manner로 $F_{0}$ estimator를 training 하기 위해 AutoEncoding을 채택함
- 먼저 pitch encoder $f_{\theta_{P}}$는 Constant-Q-Transform (CQT)를 input feature로 사용하여 50Hz에서 1000Hz까지 64 frequency bin으로 probability distribution을 logarithmically output 함
- $F_{0}$는 frequency bin에 대한 probability distribution을 weighted averaging 하여 estimate 됨 - 추가적으로 pitch encoder는 periodic amplitude $A_{p}[n]$과 aperiodic amplitude $A_{ap}[n]$의 2가지 amplitude value를 output 함
- 이후 $F_{0}[n], A_{p}[n]$은 sample-level로 linearly upsample 되고 $F_{0}[t], A_{p}[t]$는 sinusoidal waveform $x[t]=A_{p}[t]\sin\left(\sum_{k=1}^{t}2\pi \frac{F_{0}[k]}{N_{s}}\right)$으로 transform 됨
- $N_{s}$ : sampling rate - $A_{ap}[n]$은 $A_{ap}[t]$로 linearly upsample 되고 shaped noise $y[t]=A_{ap}[t]\cdot n[t]$를 생성함
- $n[t]\sim \mathcal{U}[-1,1]$ - 최종적으로 두 signal $x[t],y[t]$를 add 하여 input excitation signal $z[t]=x[t]+y[t]$를 얻음
- 먼저 pitch encoder $f_{\theta_{P}}$는 Constant-Q-Transform (CQT)를 input feature로 사용하여 50Hz에서 1000Hz까지 64 frequency bin으로 probability distribution을 logarithmically output 함
- Synthesizer가 input signal을 reconstruct 하면 pitch encoder는 reconstruction loss를 통해 training 됨
- BUT, reconstruction만 사용하는 training은 unstable 하고 pitch estimation quality가 나쁘므로, pitch label을 포함하는 synthetic audio dataset이 필요함 - 한편으로 speech, singing voice에 대한 해당 dataset을 얻는 것은 어려우므로, 논문은 CQT input 간의 relative pitch difference를 활용하는 self-supervised pitch estimation method를 도입함
- 먼저 CQT $\mathbf{X}\in\mathbb{R}^{N\times F}$를 추출하고, 여기서 CQT feature의 1 frequency bin은 0.5 semitone에 해당함
- $N,F$ : 각각 time, frequency size - $\mathbf{X}$의 frequency bin을 crop 하여 동일한 size를 가지는 2개의 CQT matrix $\tilde{\mathbf{X}}^{(1)}, \tilde{\mathbf{X}}^{(2)}\in\mathbb{R}^{N\times F^{scope}}$를 얻음
- $\tilde{\mathbf{X}}^{(1)}$의 frequency range는 $f_{\min}$에서 $f_{\max}$까지 consistently span 되지만, $\tilde{\mathbf{X}}^{(2)}$는 $\tilde{\mathbf{X}}^{(1)}$의 frequency-axis를 $d\sim \mathcal{U}(d_{\min},d_{\max})$만큼 randomly shifting 하여 얻어짐 - 이후 두 cropped CQT feature는 pitch encoder로 전달되어 두 fundamental frequency sequence $\tilde{F}_{0}^{(1)}, \tilde{F}_{0}^{(2)}$를 output 함
- 결과적으로 relative pitch difference loss는 $\mathcal{L}_{pitch}=h\left(\left| \log_{2}( F_{0}^{(1)})-\log_{2}(\tilde{F}_{0}^{(2)}) -0.5d \right|\right)$와 같이 얻어짐
- $h(\cdot)$ : huber norm
- 먼저 CQT $\mathbf{X}\in\mathbb{R}^{N\times F}$를 추출하고, 여기서 CQT feature의 1 frequency bin은 0.5 semitone에 해당함
- 즉, NANSY++는 2가지 self-supervised pitch estimation method를 end-to-end analysis-synthesis training loop에 integrate 함으로써 synthetic data 없이 absolute pitch estimation을 수행할 수 있음
- Disentangled Linguistic Representation
- Linguistic representation이 다른 analysis representation과 disentangle 되도록 NANSY의 information perturbation과 ContentVec의 contrastive loss를 combine 함
- 먼저 linguistic information에 영향을 주지 않는 perturbation function을 통해 2개의 서로 다른 signal을 얻음
- 이후 각 perturbed signal에서 Wav2Vec feature를 추출하고 linguistic information encoder $f_{\theta_{L}}$로 전달함
- 최종적으로 contrastive loss는 두 linguistic representation $\mathbf{L}_{n}^{(1)}, \mathbf{L}_{n}^{(2)}$를 사용하여 얻어짐:
(Eq. 1) $\mathcal{L}_{contr}=\sum_{i=1}^{2}\left(-\log \left(\sum_{n=1}^{N}\frac{\exp\left( \text{d}\left( \mathbf{L}_{n}^{(1)},\mathbf{L}_{n}^{(2)}\right)/k\right)}{\sum_{\nu\in \{ n\}\cup\mathcal{I}_{n} }\exp \left(\text{d}\left(\mathbf{L}_{n}^{(i)},\mathbf{L}_{\nu}^{(i)} \right)/k\right)} \right)\right)$
- $k$ : temperature, $\text{d}$ : cosine similarity, $\mathcal{I}_{n}$ : negative sample에 대한 randomly selected frame index set
- Contrastive loss는 $\mathbf{L}^{(1)}, \mathbf{L}^{(2)}$의 difference를 minimize 하면서 $\mathbf{L}^{(i)}$ 내의 similarity는 utterance의 consistent information을 minimize 하도록 함
- 이때 논문은 $\mathbf{L}^{(1)}$을 synthesizer에 전달하여 whole end-to-end analysis-synthesis loop에서 $f_{\theta_{L}}$이 reconstruction loss와 함께 jointly training 되도록 함 - 결과적으로 얻어지는 learned linguistic representation은 TTS, SVS 등의 application에서 fast training, data efficiency를 제공함
- 먼저 linguistic information에 영향을 주지 않는 perturbation function을 통해 2개의 서로 다른 signal을 얻음
- Time-Varying Timbre Embedding
- Disentangled pitch와 linguistic representation에서 waveform을 합성하려면 input signal을 fully reconstruct 할 만큼 timbre information을 well-encode 해야 함
- 여기서 논문은 일반적인 single vector encoded timbre information이 다양한 timbral characteristic을 capture 하기 적합하지 않다고 가정함
- 추가적으로 timbre는 static 하지 않고 pitch, amplitude, linguistic information 등의 time-varying content에 따라 달라진다고 가정함 - 이를 기반으로 timbre encoder $f_{\theta_{T}}$를 사용하여 timbre feature를 global timbre embedding과 timbre token으로 breakdown 함
- $f_{\theta_{T}}$는 mel-spectrogram을 input으로 attentive statistical time-pooling을 통해 summarize 된 global timbre embedding $\mathbf{g}$를 생성함
- 이를 통해 utterance 내의 overall timbral characteristic을 capture 할 수 있음 - Timbre token $\mathbf{v}_{i},\,\,i=1,...,I$는 다양한 timbral characteristic을 fixed number의 token으로 capture 함
- Timbre token은 cross-attention mechanism을 통해 추출되고, trainable latent vector는 query로 사용되고, key/value는 timbre encoder에서 얻어짐
- $f_{\theta_{T}}$는 mel-spectrogram을 input으로 attentive statistical time-pooling을 통해 summarize 된 global timbre embedding $\mathbf{g}$를 생성함
- 앞선 timbre feature 추출 이후, cross-attention을 적용하여 다른 analysis content representation에 대한 time-varying timbre embedding을 얻음
- 이를 위해 논문은 $[F_{0},A_{p},A_{ap},\mathbf{L},\mathbf{g}]$의 concatenation을 query로 사용함
- Key는 $I$ trainable vector로 구성되고 timbre token은 value로 사용됨 - 최종적으로 cross-attention output과 $\mathbf{g}$는 spherical linear interpolation을 사용해 interpolate 되어 time-varying timbre embedding을 구성함
- 이를 위해 논문은 $[F_{0},A_{p},A_{ap},\mathbf{L},\mathbf{g}]$의 concatenation을 query로 사용함
- 여기서 논문은 일반적인 single vector encoded timbre information이 다양한 timbral characteristic을 capture 하기 적합하지 않다고 가정함
- Waveform Synthesis
- Synthesis module은 frame-level, sample-level synthesizer로 구성됨
- Frame-level synthesizer는 linguistic feature, time-varying speaker embedding을 사용하여 sample-level synthesizer에 대한 frame-level condition을 생성함
- 이후 frame-level condition은 sample-level conditioning을 위해 linearly upsample 됨 - Sample-level synthesizer는 excitation signal과 sample-level feature를 사용하여 input waveform을 reconstruct 함
- Sample-level synthesizer의 경우 Parallel WaveGAN architecture를 사용함 - Whole analysis and synthesis module은 reconstruction loss를 통해 training 됨
- Reconstruction loss의 경우 Multi-Scale Spectrogram (MSS) loss, Mel-Spectrogram loss를 사용함
- 이때 pitch encoder의 stable training을 위해, MSS loss에 대해 log-scale spectrogram 대신 linear frequency-scale spectrogram을 사용함 - 추가적으로 high-quality synthesis를 위해 Adversarial loss, Feature Matching loss를 채택함
- 이를 위해 HiFi-GAN의 Multi-Period Discriminator를 사용함
- Reconstruction loss의 경우 Multi-Scale Spectrogram (MSS) loss, Mel-Spectrogram loss를 사용함
- 한편으로 analysis module 이전에 input waveform은 16kHz로 downsampling 되고 synthesizer를 통해 original 44.1kHz waveform을 생성함
- 즉, 16kHz에서 44.1kHz로의 audio upsampling을 수행함
- Frame-level synthesizer는 linguistic feature, time-varying speaker embedding을 사용하여 sample-level synthesizer에 대한 frame-level condition을 생성함
3. Experiments
- Settings
- Dataset : VCTK, OpenCPop
- Comparisons:
- Frequency Detection : praat, rapt, pyin, crepe
- Reconstruction : HiFi-GAN
- Voice Conversion : YourTTS
- Text-to-Speech : Glow-TTS
- Singing Voice Synthesis : DiffSinger
- Results
- Fundamental Frequency Detection
- NANSY++ backbone과 기존 $F_{0}$ estimator를 ABX test 측면에서 비교해 보면
- NANSY++ pitch encoder로 estimate 한 $F_{0}$ 성능이 기존 estimator 보다 우수함
- Reconstruction
- HiFi-GAN $\mathbf{BL}_{H}$과 비교하여 NANSY++ backbone이 더 우수한 reconstruction 성능을 보임
- Voice Conversion
- NANSY++는 YourTTS $\mathbf{BL}_{Y}$보다 더 우수한 VC 성능을 달성함
- Text-to-Speech
- TTS 측면에서 NANSY++는 Glow-TTS $\mathbf{BL}_{G}$ 보다 우수한 성능을 보임
- Zero-shot TTS에 대해서도 최고의 성능을 달성함
- Singing Voice Synthesis
- 마찬가지로 NANSY++는 DiffSinger $\mathbf{BL}_{D}$ 보다 뛰어난 성능을 달성함
- Voice Attribute Control
- NANSY++는 age shift, gender shift 등의 voice attribute control을 안정적으로 수행할 수 있음
- Voice Identity Generation
- NANSY++는 real speaker distribution에 대해 75%의 diversity를 가지는 다양한 speaker를 생성할 수 있음
반응형
'Paper > Conversion' 카테고리의 다른 글
댓글