PromptTTS2
PromptTTS2
๐ Key Takeaways
- 1๏ธโฃ Diffusion ๊ธฐ๋ฐ์ Variation NW๋ก reference representation์ ๋ชจ๋ธ๋ง
- 2๏ธโฃ ์์ฑ์ text prompt๋ฅผ ์๋์ผ๋ก ๋ผ๋ฒจ๋งํ๋ ํ์ดํ๋ผ์ธ ๊ฐ๋ฐ
Introduction
Speech vs. Text
์์ฑ์ ํ ์คํธ๋ณด๋ค ๋ ๋ง์ ์ ๋ณด๋ฅผ ์ ๋ฌํ ์ ์๋ค. ๊ฐ์ ๋จ์ด๋ผ๋ ๋ค์ํ ๋ชฉ์๋ฆฌ๋ก ๋ฐ์ํ๋ฉด ์๋ก ๋ค๋ฅธ ์ ๋ณด๋ฅผ ์ ๋ฌํ ์ ์๊ธฐ ๋๋ฌธ์ด๋ค.
Traditional TTS vs. Text-based TTS
- traditional TTS: ์์ฑ ํ๋กฌํํธ(Reference Speech)์ ์์กดํ์ฌ ์์ฑ ๋ณ์ด๋ฅผ ํํํ๋ค.
- Text-based TTS
- Text Prompts(์ค๋ช ) ์ฌ์ฉ
- ์์ฑ ํ๋กฌํํธ๋ฅผ ์ฐพ๊ธฐ ์ด๋ ค์ด ๊ฒฝ์ฐ๋ ์กด์ฌํ์ง ์์ ๋ ์ ์ฉ
Challenges of Text-based TTS
One-to-Many Problem
- Speech๋ ์์ฑ ๋ณ์ด(voice variability)๋ฅผ ์์ธํ๊ฒ ํฌํจํ๊ณ ์์ด, ํ ์คํธ ํ๋กฌํํธ๋ ์์ฑ์ ๋ชจ๋ ํน์ง์ ํฌ์ฐฉํ ์ ์์.
- ๊ฐ์ text prompt๋ก ์ฌ๋ฌ ๊ฐ์ง ์์ฑ ์ํ์ ์์ฑํ ์ ์์.
- ์ด ๋ฌธ์ ๋ TTS ๋ชจ๋ธ ํ๋ จ์ ์ด๋ ต๊ฒ ๋ง๋ค์ด ๊ณผ์ ํฉ(overfitting)์ด๋ ๋ชจ๋ ๋ถ๊ดด(mode collapse)๋ก ์ด์ด์ง ์ ์์.
- ํ์ฌ๊น์ง One-to-Many ๋ฌธ์ ๋ฅผ ํด๊ฒฐํ๊ธฐ ์ํ ๊ตฌ์ฒด์ ์ธ ๋ฐฉ๋ฒX
Data-Scale Problem
- Text prompt๋ก ์์ฑ์ ์ค๋ช ํ๋ ๋ฐ์ดํฐ์ ์ ๊ตฌ์ฑํ๋ ๊ฒ์ด ์ด๋ ค์.
- High Cost
- ํ ์คํธ ํ๋กฌํํธ ๋ฐ์ดํฐ์ ์ 20K ๋ฌธ์ฅ ์ ๋๋ก ์๋์ ์ผ๋ก ์๊ฑฐ๋ ๊ณต๊ฐ๋์ง ์์.
2. Overview
๊ตฌ์ฑ ์์
- 1๏ธโฃ Variation NW
- Diffusion ๋ชจ๋ธ ์ฌ์ฉ
- prompt representation $(P_1, โฆ, P_M)$์ ์กฐ๊ฑด์ผ๋ก reference representation $(R_1, โฆ, R_N)$ ์์ธก
- 2๏ธโฃ Style Module
- Text Prompt Encoder
- BERT-based model
- text prompt์ hidden representation ์ถ์ถ
- Reference Speech
- reference speech encoder๋ฅผ ์ฌ์ฉํ์ฌ text prompt์์ ๋ค๋ฃจ์ง ๋ชปํ๋ ์์ฑ ๋ณํ๋ฅผ ๋ชจ๋ธ๋ง โ One-to-many mapping ๋ฌธ์ ํด๊ฒฐ
- Cross attention
- Prompt hidden๊ณผ Reference hidden์ ๊ฐ๊ฐ ์ ์ฉ๋จ
- fixed length representation ์ถ์ถ
- Text Prompt Encoder
- 3๏ธโฃ TTS Module
- ์์ฑ์ ํฉ์ฑํ๋ค. Style Module์ ์ํด ์์ฑ ํน์ฑ์ด ์ ์ด๋จ
- ์์ฑ์ phonemes(์์)์์ ํฉ์ฑํ ์ ์๋ ์ด๋ค TTS backbone์ด๋ผ๋ ์ฌ์ฉ ๊ฐ๋ฅ
Inference phase
- without reference speech
- only text prompt provided
- ํ๋ จ๋ variation network๋ฅผ ์ด์ฉํด text prompt representation์ ๊ธฐ๋ฐ์ผ๋ก reference representation $(R_1, \dots, R_N)$์ ์์ธกํ๋ค.
3. Variation NW
- Goal: prompt representation $(P_1, โฆ, P_M)$์ ์กฐ๊ฑด์ผ๋ก reference representation $(R_1, โฆ, R_N)$ ์์ธก
Diffusion Model ์ฌ์ฉ
- Diffusion model๋ก reference representation ๋ชจ๋ธ๋ง
- Diffusion model
- a robust capability in modeling multimodal distributions and complex data spaces
- ์ด ๋ชจ๋ธ์ ๋ํ variation NW๊ฐ Gaussian noise์์ ๋ค์ํ voice variability๋ฅผ ์ํ๋งํ ์ ์๊ฒ ํ๋ค.
Diffusion Process
- Forward Diffusion:
- ์ฃผ์ด์ง reference representation $z_0$ โ Gaussian noise๋ก ๋ณํ
- ์ด ๊ณผ์ ์ noise schedule $\beta_t$๋ฅผ ๋ฐ๋ฅธ๋ค: \(\frac{d{z_t}}{d_t}=โ\frac{1}2{\beta_t}z_t+\sqrt{\beta_t} dw_t, \quad t \in [0, 1]\)
- Denoising Process:
- noisy representation $z_t$ โ reference representation $z_0$
Training phase
- Training Goal: noisy data์ log-density gradient $โ\logโกp_t(z_t)$ ์ถ์
Variation NW ์ํคํ ์ฒ
- Transformer Encoder ๊ธฐ๋ฐ
- Input (3๊ฐ์ง)
- prompt representation $(P_1, โฆ, P_M)$
- noised reference representation $(R^t_1, โฆ, R^t_M)$
- diffusion step $t$
- Output
- ์๋ณธ reference representation $z_0$์ ํด๋นํ๋ hidden representation
- L1 loss๋ก ์ต์ ํ๋๋ค.
- ์๋ณธ reference representation $z_0$์ ํด๋นํ๋ hidden representation
- ๋ชจ๋ธ์ด diffusion step $t$๋ฅผ ๋ ์ ์ธ์ํ ์ ์๋๋ก FiLM์ Transformer Encoder์ ๊ฐ ๋ ์ด์ด์ ์ ์ฉํ๋ค.
Inference phase
- Prompt Representation ์ถ์ถ:
- style module์ ์ฌ์ฉํ์ฌ text prompt์์ prompt representation์ ์ถ์ถํ๋ค.
- Reference Representation ์์ธก:
- prompt representation์ ์กฐ๊ฑด์ผ๋ก reference representation์ ์์ธก
- Gaussian noise์์ denoising ์ํํ๋ค.
- Concatenation
- the prompt representation are concatenated with the reference representation to guide the TTS module through cross attention
4. Text Prompt Generation Pipeline w/ LLM
 |
- 1๏ธโฃ SLU: ์์ฑ์์ ์์ฑ(์: ์ฑ๋ณ, ๊ฐ์ , ๋์ด ๋ฑ)์ ์ธ์ํ์ฌ label ํ๊น
- 2๏ธโฃ LLM: ํ๊น ๋ label์ ๊ธฐ๋ฐ์ผ๋ก text prompt ์์ฑ
LLM Part
LLM ๋ถ๋ถ์ ๋ ์์ธํ ์ดํด๋ณด์. LLM ๋ถ๋ถ์ ํฌ๊ฒ 4๋จ๊ณ๋ก ์ด๋ฃจ์ด์ง๋ค.
Stage 1) Keyword Construction
- SLU: ์์ฑ์ attribute๋ฅผ ์ธ์ํ๊ณ , ๊ฐ attribute์ ๋ํด ์ฌ๋ฌ class๋ฅผ ์ธ์ํ๋ค.
- LLM: ๊ฐ class์ ๋ํด ์ฌ๋ฌ keyword๋ฅผ ์์ฑํ๋ค.
- ex. โ์ฑ๋ณโ attribute๋ โ๋จ์ฑโ๊ณผ โ์ฌ์ฑโ class๋ฅผ ๊ฐ์ง๊ณ , โ๋จ์ฑโ class์ keyword๋ โmanโ, โheโ ๋ฑ์ด ๋ ์ ์๋ค.
Stage 2) Sentence Construction
- for ๋ฌธ์ฅ์ ๋ค์์ฑ
- LLM์ ๊ฐ attribute์ ๋ํด ์ฌ๋ฌ ๋ฌธ์ฅ์ ์์ฑํ๋๋ก ์ง์๋๋ค.
- LLM์ attribute๋ฅผ ์ค๋ช ํ ๋ placeholder(์: โ[Gender]โ)๋ฅผ ์ฌ์ฉํ์ฌ ๋ฌธ์ฅ์ ์์ฑํ๋ค.
Stage 3) Sentence Combination
- ์ฌ๋ฌ attribute๋ฅผ ์ค๋ช ํ๋ ํ ์คํธ ํ๋กฌํํธ๊ฐ ํ์ํ๋ฏ๋ก, 2๋จ๊ณ์์ ์์ฑ๋ ๋ฌธ์ฅ์ ๊ฒฐํฉํ๋ค.
- LLM์ ์ฌ๋ฌ attribute๊ฐ ๊ฒฐํฉ๋ ์๋ก์ด ๋ฌธ์ฅ์ ์์ฑํ๋๋ก ์ง์๋๋ค.
- ์ฌ์ฉ์๊ฐ TTS ์์คํ ์ ์ ๊ณตํ๋ ํ ์คํธ ํ๋กฌํํธ๋ ๋ฐ๋์ ํ์์ ๋ง๋ ๋ฌธ์ฅ์ด ์๋ ์ ์๊ธฐ ๋๋ฌธ์, LLM์ ๋ค์์ฑ์ ๋ํ๊ธฐ ์ํด ๊ตฌ๋ฌธ์ ๊ฒฐํฉํ ๋ฌธ์ฅ๋ ์์ฑํ๋ค.
Stage 4) Dataset Instantiation
- ์์ ์ธ ๋จ๊ณ๋ฅผ ํตํด ์์ฑ๋ ๊ฒฐ๊ณผ๋ค์ ์ต์ข ํ ์คํธ ํ๋กฌํํธ ๋ฐ์ดํฐ์ ์ ํ์ฑํ๋ฉฐ, ์ด๋ ์์ฑ ๋ฐ์ดํฐ์ ๊ณผ ํจ๊ป ์ฌ์ฉ๋๋ค.
- ์์ฑ ๋ฐ์ดํฐ $S$์ ๋ํด SLU ๋ชจ๋ธ๋ก ๊ฐ attribute์ ํด๋์ค๋ฅผ ํ๊น ํ ํ, ๊ฐ attribute์ ๋ํ ๋ฌธ์ฅ์ ์ ํํ๋ค.
- attribute์ ํด๋นํ๋ keyword๋ฅผ ๋ฌธ์ฅ์์ placeholder์ ์ฝ์ ํ์ฌ ์ต์ข ํ ์คํธ ํ๋กฌํํธ๋ฅผ ์์ฑํ๋ค.
5. Experiment
Datasets
- Speech Dataset: Multilingual LibriSpeech (MLS)์ ์์ด ํ์ ์งํฉ์ ์ฌ์ฉํ๋ค. ์ด ๋ฐ์ดํฐ์ ์ 44K ์๊ฐ ๋ถ๋์ ์ ์ฌ๋ speech ๋ฐ์ดํฐ๋ฅผ ํฌํจํ๊ณ ์์ผ๋ฉฐ, LibriVox audiobooks์์ ์์ง๋์๋ค.
- Text Prompt Dataset: PromptSpeech (Guo et al., 2023)๋ฅผ ์ฌ์ฉํ์ฌ, pitch, gender, volume, speed ๋ฑ ๋ค ๊ฐ์ง ์์ฑ์ ์ค๋ช ํ๋ 20K๊ฐ์ text prompts๊ฐ ํฌํจ๋์ด ์๋ค.
- Generated Prompts: LLM (GPT-3.5-TURBO)๋ฅผ ํ์ฉํด 20K๊ฐ์ text prompts๋ฅผ ์์ฑํ๋ค.
- Test Set: PromptSpeech์ test set์ 1305๊ฐ์ text prompts๋ก ๊ตฌ์ฑ๋์ด ์๋ค.
- Attribute Recognition: SLU model์ ์ด์ฉํด gender๋ ๊ณต๊ฐ๋ ๋ชจ๋ธ์ ์ฌ์ฉํ๊ณ , ๋๋จธ์ง ์์ฑ๋ค(ํผ์น, ๋ณผ๋ฅจ, ์๋)์ digital signal processing tools์ ํตํด ์ธ์ํ๋ค.
Experiment Details
- ์ด ๋ ผ๋ฌธ์์๋ TTS backbone์ผ๋ก NaturalSpeech 2๋ฅผ ์ ํํ๋ค.
- Reference Speech Encoder์ Variation Network์ ๋ ์ด์ด ์๋ ๊ฐ๊ฐ 6๊ณผ 12๋ก ์ค์ ๋๋ฉฐ, hidden size๋ 512์ด๋ค.
- Style Module์ query number $M, N$์ ๋ชจ๋ 8๋ก ์ค์ ๋๋ค.
- TTS Backbone๊ณผ Text Prompt Encoder๋ ๊ฐ๊ฐ NaturalSpeech 2 ์ PromptTTS์ ์ค์ ์ ๋ฐ๋ฅธ๋ค.
6. Result
Attribute Control Accuracy
PromptTTS 2๋ baseline systems์ ๋น๊ตํ์ฌ ๋ชจ๋ ์์ฑ์ ๋ํด ๋ ๋์ ์ ํ๋๋ฅผ ๋ณด์๋ค. ํ๊ท ์ ์ผ๋ก 1.79% ํฅ์๋ ์ฑ๋ฅ์ ๊ธฐ๋กํ์๋ค.
Speech Quality
PromptTTS 2๋ MOS (Mean Opinion Score)์ CMOS (Comparative MOS) ํ ์คํธ์์ baseline systems๋ณด๋ค ๋ ๋์ speech quality๋ฅผ ๋ฌ์ฑํ์๋ค.
This post is licensed under CC BY 4.0 by the author.