https://arxiv.org/abs/2312.08676
SEF-VC: Speaker Embedding Free Zero-Shot Voice Conversion with Cross Attention
Zero-shot voice conversion (VC) aims to transfer the source speaker timbre to arbitrary unseen target speaker timbre, while keeping the linguistic content unchanged. Although the voice of generated speech can be controlled by providing the speaker embeddin
arxiv.org
해당 논문을 보고 작성했습니다.
Abstract
zero-shot voice conversion (VC)는 source speaker 음색을 임의의 unseen target speaker 음색으로 변환하는 것을 목표로 하며, 이 과정에서 언어적 content는 변화되지 않아야 합니다. 생성된 speech의 voice는 target speaker의 speaker embedding을 통해 control 될 수 있지만, ground truth recording보다 speaker similarity는 여전히 떨어지는 모습을 보여줍니다. 이 논문에서 저자들은 SEF-VC라는 speaker embedding free voice conversion model을 제안합니다. SEF-VC는 position-agnostic cross-attention mechanism을 활용하여 reference speech의 화자 음색을 학습하고 적용하며, non-autogressive manner로 HuBERT semantic token으로부터 waveform을 reconstruct 합니다. 간결한 SEF-VC 구조는 학습 안정성과 voice conversion performance를 향상시켰습니다. objective and subjective evaluation을 통해 SEF-VC가 strong zero-shot VC baseline보다 더 target reference와 유사하고 quality가 높은 speech를 합성할 수 있음을 보였습니다.
Introduction
Zero-shot voice conversion은 source speaker로부터 주어진 speech의 content는 유지한 채로, 이전에 보지 못했던 target speaker의 목소리로 변환하는 task를 의미합니다. zero-shot voice conversion은 주로 speaker와 content 정보를 분리하는 것과 speaker representation modeling 하는 것에 어려움이 존재합니다. diesntanglement는 source speech에서 speaker information을 제거하는 것을 목표로 하고 speaker representation modeling은 speaker identity를 표현하고 통합하는 좋은 방법을 찾는 것을 목표로 합니다.
대부분의 VC method들은 speaker verification network로부터 얻어낸 global speaker embedding을 사용하여 target speaker를 representation합니다. pretrained speaker encoder를 사용하기도 합니다. 이전 연구 중 일부는 posterior distribution으로부터 speaker embedding을 sampling 하기도 합니다. 이러한 방식들의 VC 성능은 speaker embedding 성능에 따라 한계가 존재하며, short reference에서는 robust 하지 못한 결과를 보여줍니다. 최근 speech language model들은 주어진 speech prompt로부터 target voice를 예측하는 in-context learning strategy를 사용하여 위 문제들을 피하기도 합니다. 하지만 autoregressive 하다는 특성 때문에 안정성 문제는 여전히 존재하게 됩니다.
이전 연구들과 다르게, 저자들은 speaker embedding free zero-shot VC model인 SEF-VC를 제안합니다. speaker modeling을 할 떄 position-agnostic cross-attentioin mechanism을 사용합니다. 이는 conventional speaker embedding approach를 새롭고 효과적이며 robust 한 cross-attention mechanism으로 대체합니다. SEF-VC는 이 cross-attention을 통해 reference speech로부터 speaker timbre를 학습하고 통합하도록 design 되었으며, non-autoregressive 방식으로 HuBERT semantic token으로부터 waveform을 reconstruct 합니다. position-agnostic cross attention mechanism을 이용해 speaker information을 더 잘 modeling 하고 semantic backbone으로 통합됩니다.
SEF-VC
Non-Autoregressive Semantic Backbon
저자들이 제안한 model의 구조는 위와 같습니다. SEF-VC의 backbone model은 vec2wav와 같은 discrete self-supervised speech representation을 사용하는 standard vocoder와 SSR-VC입니다. pretrained HuBERT model로 추출한 continuous feature에 K-Means quantization을 적용해 semantic token을 얻습니다. 그다음 frame-level semantic token을 2가지 semantic encoder에 pass 한 다음 HiFiGAN generator에 넣어 waveform으로 upsample 합니다. auxiliary feature adaptor를 두 semantic encoder 사이에 위치시켜 pitch, probability of voice, energy (PPE)를 예측하여 speech prosody feature를 modeling 할 수 있도록 도와줍니다. 합성 quality를 향상시키기 위해, 저자들은 adversarial training을 사용합니다. discriminator는 multi-period discriminator (MPD)와 multi-scale discriminator (MSD)로 구성됩니다.
Position-Agnostic Cross-Attention Mechanism
self-supervised semantic token은 speaker information을 풍부하게 제공하지 못하기 때문에, timbre 변환은 speaker information의 explicit introduction에 의존할 수 밖에 없습니다. 이전 연구들에서 사용하는 speaker embedding 대신, 저자들은 speaker embedding free cross-attention task를 사용하여 semantic backbone이 reference speech로부터 speaker timbre를 학습하고 통합할 수 있도록 만들었습니다. 풍부한 speaker information을 나타내고 있는 reference speech에서 mel-spectrogram을 추출하고 이를 semantic backbone에 통합시키기 위해, position-agnostic cross-attention mechanism을 사용하였습니다.
구체적으로 semantic backbone에서 각 semantic encoder들은 여러 conformer block으로 구성됩니다. 각 conformer block에서는 self-attention layer 사이 cross-attention layer와 convolution module이 존재합니다. cross-attention 이전에 target speech의 mel-spectrogram을 1D convolution layer로 구성된 pre-net mel encoder에 feed 합니다. 여기서 cross-attention mechanism은 input position에 대해 agnostic 합니다. 즉 standard attention mechanism에 있는 position encoding을 제거하여 encoded mel-spectrogram으로부터 key와 value matrix를 구할 때 위치 정보를 고려하지 않도록 설계되어 있습니다. 이는 encoded mel-spectrogram을 shuffling 하는 것과 동일하며 대부분의 speaker timbre가 시간 순서에 연관 없기 때문에 sequential order를 깨도 많은 양의 speaker information이 유지되지만, 다른 정보들은 사라지게 됩니다. 이를 통해 cross-attention mechanism이 reference speech에서 speaker timbre만 capture 하도록 학습됩니다.
이러한 cross-attention mechanism은 짧거나 긴 reference 모두에서 효과적입니다. short reference의 경우에도 cross-attention mechanism이 mel-spectrogram을 바로 사용하여 기존의 speaker embedding에서 생기는 부정확한 speaker modelling의 문제점을 피할 수 있게 됩니다. long reference의 경우, position-agnostic cross-attention mechanism이 어떠한 길이의 reference speech든 동작할 수 있으며, 기존의 방식보다 length에 대한 제약이 적습니다. 기존 autoregressive speech language model은 acoustic prompt를 통해 semantic content를 prefix 하고 self-attention만으로 전체 sequence를 modeling 합니다. 하지만 SEF-VC는 non-autoregressive 방식으로 position-agnostic cross-attention method를 사용하기 때문에 inference의 안정성과 speed 문제를 해결할 수 있습니다.
Training and Inference
위 그림과 같이, 저자들은 model을 학습할 때 non-parallel data를 사용합니다. 그래서 single utterance를 2개 부분으로 나눕니다. 첫 segment는 speaker information을 제공하는 mel-spectrogram을 추출하기 위해 사용됩니다. 이는 random starting point에서 2~3초의 가변 길이 audio로 sample 됩니다. utterance의 남은 부분읜 pretrained HuBERT model에 feed 되어 semantic token을 추출하는 데 사용됩니다. 이러한 학습 방식은 두 segment가 항상 동일한 화자이면서 oracle speaker label을 필요로 하지 않게 됩니다. auxiliary feature adaptor의 경우, 학습 과정에서 첫 번째 semantic encoder의 output을 사용하여 PPE를 예측합니다. 그다음 ground-truth PPE를 첫 번째 semantic encoder의 output에 더해 나머지 module들이 waveform을 reconstruction 할 수 있도록 도와줍니다.
generator loss $L_G$는 다음과 같은 weighted sum으로 표현됩니다.
$L_{rec}$는 real mel-spectrogram과 synthetic waveform의 mel-spectrogram 사이의 L1 distance로 측정된 reconstruction loss를 의미합니다. $L_{feat}$는 discriminator의 중간 output의 $L_1$ feature matching loss를 의미합니다. $L_{mel}$은 두번째 semantic encoder의 otuput과 target mel-spectrogram 사이 $L_1$을 의미합니다. $L_{aux}$는 ground-truth PPE와 auxiliary feature adaptor의 PPE output 사이 $L_1$을 의미합니다. $L_{adv}$는 $L_2$ adversarial loss입니다.
voice conversion inference 과정에서는 target reference speech에서 speaker information을 포함하고 있는 mel-spectrogram을 추출하고 source speech에서 semantic token을 추출합니다. 이 과정에서 학습에서 사용했던 pretrained HuBERT와 동일한 HuBERT를 사용합니다. semantic information과 reference speech 둘을 기반으로 target speaker의 PPE를 예측합니다.
Experiments and Results
Data and Implementation Details
multi-speaker English dataset이고 총길이가 586시간인 LibriTTS로 실험을 진행하였습니다. 학습할 때 너무 길거나 너무 짧은 utterance들은 제거했으며, 16kHz로 downsampling 하였다고 합니다. 총 2456명의 speaker로 구성되며, 학습 때 2311명, validation에서 73명을 사용하였으며, test에서 72명을 사용하였습니다. zero-shot voice conversion 성능을 평가하기 위해, LibriTTS's test-clean set에서 20명을 선택하였습니다. 10명을 source speaker로 사용하고 각 speaker마다 2개 utterance를 선택해 source speech로 사용하였습니다. 그리고 남은 10명을 target speaker로 사용하였으며, 각 speaker마다 1개 utterance를 선택해 target speech로 사용하였습니다.
LibriLight 60k 시간으로 학습된 pretrained HuBERT model에서 1024차원 semantic feature를 추출하였습니다. 그다음 2000개 center로 K-Means clustering을 진행해 양자화를 수행하였습니다. 두 semantic encoder 모두 2개 conformer block으로 구성되며, self-attention의 multi-head attention layer와 cross-attention의 2 head attention layer로 구성되며, attention dimension은 184입니다. mel-encoder는 kernel size 5인 1 convolution layer로 구성되고, output dim은 184입니다. $\lambda_{mel} = 60, \lambda_{aux} = 5, \lambda_{rec} = 45, \lambda_{adv} = 1, \lambda_{feat} = 2$로 설정하였습니다.
Any-to-Any Voice Conversion Results
SEF-VC의 any-to-any voice conversion에서의 speaker similarity와 speech intelligibility를 평가하였습니다. objective evaluation으로 speaker embedding cosien similarity (SECS), character error rate (CER)을 수행하였습니다. 그리고 MOS를 통해 speaker similarity를 평가하였습니다.
결과는 위와 같습니다. SEF-VC가 좋은 성능을 보인다는 것을 알 수 있습니다.
Different Reference Lengths
2s, 3s, 5s and 10s의 길이 audio에서의 SEF-VC와 SSR-VC 성능을 확인하였습니다. 결과는 위와 같습니다. SEF-VC가 짧은 audio 뿐만 아니라 긴 audio에서도 좋은 성능을 보인다는 것을 알 수 있습니다.
Cross-Attention vs Speaker Embedding
SEF-VC에서 cross-attention module을 없애고 speaker embedding을 바로 HifiGAN generator에 더했습니다. 결과는 위와 같습니다. 위 그림과 같이 cross-attention module을 사용했을 때 더 나은 결과를 보인다는 것을 알 수 있습니다. cross-attention mechanism이 target speaker 정보를 더 잘 학습하기 때문에 이러한 결과를 보인다고 합니다. 그리고 speaker embedding이 충분한 speaker-dependent information을 제공할 수 없기 때문에 이런 결과를 보인다고 합니다.
Conclusion
저자들은 speaker embedding free voice conversion model인 SEF-VC를 제안하며, 이는 position-agnostic cross-attention mechanism을 이용하여 reference speech로부터 speaker timbre를 학습하고 통합하며, non-autoregressive 방식으로 HuBERT semantic token으로부터 waveform을 reconstruct 합니다. SEF-VC의 간단한 구조로 학습 안정성과 voice conversion 성능을 향상시켰습니다.