This repository is a fork of the Amphion project, modified for VEVO TTS experiments.
The current code is configured for the following datasets:
- Emilia-Korean Dataset
- AIHub Korean Dataset
(Some parts of the code are currently being modified.)
현재 Amphion 전체 GitHub를 fork하여 사용 중입니다.
Repository: https://github.com/open-mmlab/Amphion 공식 VEVO README: https://github.com/open-mmlab/Amphion/tree/main/models/vc/vevo
apt update
apt install -y gitcd home/vmuser
# Fork한 저장소
git clone https://github.com/sujin-koo/vevo.git
cd vevo
# 또는 공식 Amphion 저장소
git clone https://github.com/open-mmlab/Amphion.git
cd Amphion
distribution=$(. /etc/os-release;echo $ID$VERSION_ID) \
&& curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add - \
&& curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | \
sudo tee /etc/apt/sources.list.d/nvidia-docker.listsudo apt-get update
sudo apt-get install -y nvidia-docker2sudo systemctl restart dockersudo docker ps
sudo docker images# CUDA 11.7 환경
sudo docker pull sujinkoo/vevo_env:3.10-slim-bullseye
# CUDA 11.8 환경 (H100과 호환)
sudo docker pull sujinkoo/vevo_env:cuda11.8sudo docker images예시 출력:
REPOSITORY TAG IMAGE ID CREATED SIZE
sujinkoo/vevo_env 3.10-slim-bullseye 4ef47ff2895c 7 hours ago 22GB
주의: -v 옵션으로 폴더를 마운트할 때는 /home 폴더뿐만 아니라 /data 등 HDD 경로도 추가로 마운트해줘야 합니다. -v 옵션은 여러 번 사용할 수 있으며, 마운트를 하지 않으면 Docker 컨테이너 내부에서 해당 폴더에 접근할 수 없습니다.
sudo docker run --gpus all -dit \
--shm-size=8G \
-v <호스트 절대경로1>:<컨테이너 절대경로1> \
-v <호스트 절대경로2>:<컨테이너 절대경로2> \
--name <컨테이너 이름> \
<이미지 이름:TAG>
#예시
sudo docker run --gpus all -dit \
--shm-size=8G \
-v /home/vmuser/:/home/vmuser/ \
-v /data/:/data/ \
--name vevo_env \
sujinkoo/vevo_env:cuda11.8sudo docker ps예시 출력:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
90e1c820ad6a sujinkoo/vevo_env:cuda11.8 "python3" 6 seconds ago Up 5 seconds vevo_env
sudo docker exec -it <컨테이너 이름> /bin/bash
# 예시
sudo docker exec -it vevo_env /bin/bash
혹은
sudo docker exec -it 90e1c820ad6a /bin/bashexitsudo docker exec -it <컨테이너 이름> /bin/bashInference 방법은 아래 Inference Script 섹션을 참고하세요.
Pretrained 모델은 자동으로 Hugging Face에서 다운로드됩니다.
hugging face 에서 official checkpoint 다운로드
./models/base/emilia_dataset.py 파일을 수정하여 사용할 수 있습니다. 자세한 구조와 처리 방식은 공식 Amphion GitHub README 문서를 참고하세요.
모델 학습에 사용되는 음성 데이터는 다음과 같은 구조를 가집니다.
/dataset/
├── KO_B00003_S022247_W0000000001.wav
├── KO_B00003_S022247_W0000000001.json
├── KO_B00003_S022247_W0000000002.wav
├── KO_B00003_S022247_W0000000002.json
├── ...각 .json 파일 형식
{
"0": {
"language": "ko",
"text": " 어, 이렇게 서레이션이, 이렇게, 그, 이렇게 제작이 되어 있는 거를 제 눈으로 볼 수 있습니다. 그거 외에, 뒤쪽에 우리가 슬라이드를 이렇게 당길 때, 이렇게 당기는 부분에 이렇게 순전 같은 경우는, 이제 이렇게 몰드 형태로 되어 있는데, 실제로 이 제품 역시 조금 더",
"start": 0.0,
"end": 17.678
}
}
Training 방법은 아래 Training Recipe 섹션을 참고하세요.
한국어에 대해 CER, WER, SECS 측정
./evaluate\_korean/evaluate\_korean.py
#구성
- converted_folder: 변환된 음성 폴더 (예: TTS 결과)
- reference_folder: 참고용 음성 폴더 (현재는 같은 파일로 구성되어 있음)
- transcription_json: 각 음성 파일에 대한 정답 문장
#예시
python ./evaluate_korean/evaluate_korean.py \
--converted_folder ./evaluate_korean/output_folder \
--reference_folder ./evaluate_korean/reference_folder \
--transcription_json ./evaluate_korean/examples.json
We present our reproduction of Vevo, a versatile zero-shot voice imitation framework with controllable timbre and style. We invite you to explore the audio samples to experience Vevo's capabilities firsthand.
We have included the following pre-trained Vevo models at Amphion:
- Vevo-Timbre: It can conduct style-preserved voice conversion.
- Vevo-Style: It can conduct style conversion, such as accent conversion and emotion conversion.
- Vevo-Voice: It can conduct style-converted voice conversion.
- Vevo-TTS: It can conduct style and timbre controllable TTS.
Besides, we also release the content tokenizer and content-style tokenizer proposed by Vevo. Notably, all these pre-trained models are trained on Emilia, containing 101k hours of speech data among six languages (English, Chinese, German, French, Japanese, and Korean).
To run this model, you need to follow the steps below:
- Clone the repository and install the environment.
- Run the inference script.
git clone https://github.com/open-mmlab/Amphion.git
cd AmphionBefore start installing, making sure you are under the Amphion directory. If not, use cd to enter.
Since we use phonemizer to convert text to phoneme, you need to install espeak-ng first. More details can be found here. Choose the correct installation command according to your operating system:
# For Debian-like distribution (e.g. Ubuntu, Mint, etc.)
sudo apt-get install espeak-ng
# For RedHat-like distribution (e.g. CentOS, Fedora, etc.)
sudo yum install espeak-ng
# For Windows
# Please visit https://github.com/espeak-ng/espeak-ng/releases to download .msi installerNow, we are going to install the environment. It is recommended to use conda to configure:
conda create -n vevo python=3.10
conda activate vevo
pip install -r models/vc/vevo/requirements.txt# Vevo-Timbre
python -m models.vc.vevo.infer_vevotimbre
# Vevo-Style
python -m models.vc.vevo.infer_vevostyle
# Vevo-Voice
python -m models.vc.vevo.infer_vevovoice
# Vevo-TTS
python -m models.vc.vevo.infer_vevottsRunning this will automatically download the pretrained model from HuggingFace and start the inference process. The result audio is by default saved in models/vc/vevo/wav/output*.wav, you can change this in the scripts models/vc/vevo/infer_vevo*.py
For advanced users, we provide the following training recipe:
-
Please download the dataset following the official instructions provided by Emilia.
-
Due to Emilia's substantial storage requirements, data loading logic may vary slightly depending on storage configuration. We provide a reference implementation for local disk loading in this file. After downloading the Emilia dataset, please adapt the data loading logic accordingly. In most cases, only modifying the paths specified in Lines 36-37 should be sufficient:
MNT_PATH = "[Please fill out your emilia data root path]" CACHE_PATH = "[Please fill out your emilia cache path]"
Train the Vevo tokenizers, the auto-regressive model, and the flow-matching model, respectively:
Note: You need to run the following commands under the
Amphionroot path:git clone https://github.com/open-mmlab/Amphion.git cd Amphion
Run the following script:
# Content Tokenizer (Vocab = 32)
sh egs/codec/vevo/fvq32.sh
# Content-Style Tokenizer (Vocab = 8192)
sh egs/codec/vevo/fvq8192.shIf you want to try different vocabulary sizes, just specify it in the egs/codec/vevo/fvq*.json:
{
...
"model": {
"repcodec": {
"codebook_size": 8192, // Specify the vocabulary size here.
...
},
...
},
...
}Specify the content tokenizer and content-style tokenizer paths in the egs/vc/AutoregressiveTransformer/ar_conversion.json:
{
...
"model": {
"input_repcodec": {
"codebook_size": 32,
"hidden_size": 1024, // Representations Dim
"codebook_dim": 8,
"vocos_dim": 384,
"vocos_intermediate_dim": 2048,
"vocos_num_layers": 12,
"pretrained_path": "[Please fill out your pretrained model path]/model.safetensors" // The pre-trained content tokenizer
},
"output_repcodec": {
"codebook_size": 8192, // VQ Codebook Size
"hidden_size": 1024, // Representations Dim
"codebook_dim": 8,
"vocos_dim": 384,
"vocos_intermediate_dim": 2048,
"vocos_num_layers": 12,
"pretrained_path": "[Please fill out your pretrained model path]/model.safetensors" // The pre-trained content-style tokenizer
}
},
...
}Run the following script:
sh egs/vc/AutoregressiveTransformer/ar_conversion.shSimilarly, you can run the following script for Vevo-TTS training:
sh egs/vc/AutoregressiveTransformer/ar_synthesis.shSpecify the pre-trained content-style tokenizer path in the egs/vc/FlowMatchingTransformer/fm_contentstyle.json:
{
...
"model": {
"repcodec": {
"codebook_size": 8192, // VQ Codebook Size
"hidden_size": 1024, // Representations Dim
"codebook_dim": 8,
"vocos_dim": 384,
"vocos_intermediate_dim": 2048,
"vocos_num_layers": 12,
"pretrained_path": "[Please fill out your pretrained model path]/model.safetensors" // The pre-trained content-style tokenizer
}
},
...
}Run the following script:
sh egs/vc/FlowMatchingTransformer/fm_contentstyle.shWe provide a unified vocos-based vocoder training recipe for both speech and singing voice. See our Vevo1.5 framework for the details.
If you find this work useful for your research, please cite our paper:
@inproceedings{vevo,
author = {Xueyao Zhang and Xiaohui Zhang and Kainan Peng and Zhenyu Tang and Vimal Manohar and Yingru Liu and Jeff Hwang and Dangna Li and Yuhao Wang and Julian Chan and Yuan Huang and Zhizheng Wu and Mingbo Ma},
title = {Vevo: Controllable Zero-Shot Voice Imitation with Self-Supervised Disentanglement},
booktitle = {{ICLR}},
publisher = {OpenReview.net},
year = {2025}
}If you use the Vevo pre-trained models or training recipe of Amphion, please also cite:
@article{amphion2,
title = {Overview of the Amphion Toolkit (v0.2)},
author = {Jiaqi Li and Xueyao Zhang and Yuancheng Wang and Haorui He and Chaoren Wang and Li Wang and Huan Liao and Junyi Ao and Zeyu Xie and Yiqiao Huang and Junan Zhang and Zhizheng Wu},
year = {2025},
journal = {arXiv preprint arXiv:2501.15442},
}
@inproceedings{amphion,
author={Xueyao Zhang and Liumeng Xue and Yicheng Gu and Yuancheng Wang and Jiaqi Li and Haorui He and Chaoren Wang and Ting Song and Xi Chen and Zihao Fang and Haopeng Chen and Junan Zhang and Tze Ying Tang and Lexiao Zou and Mingxuan Wang and Jun Han and Kai Chen and Haizhou Li and Zhizheng Wu},
title={Amphion: An Open-Source Audio, Music and Speech Generation Toolkit},
booktitle={{IEEE} Spoken Language Technology Workshop, {SLT} 2024},
year={2024}
}