Black technology based on the three giants of artificial intelligence:
OpenAI's whisper, 680,000 hours in multiple languages
Nvidia's bigvgan, anti-aliasing for speech generation
Microsoft's adapter, high-efficiency for fine-tuning
이 프로젝트에서 Lora는 완전히 구현되지 않았지만 여기에서 찾을 수 있습니다 : Lora Tts & Paper
프리 트레인 모델을 사용하여 미세 조정하십시오
필요한 사전 처리 :
그런 다음 다음 파일 구조에 따라 데이터 세트를 data_raw 디렉토리에 넣습니다.
data_raw
├───speaker0
│ ├───000001.wav
│ ├───...
│ └───000xxx.wav
└───speaker1
├───000001.wav
├───...
└───000xxx.wav1 소프트웨어 종속성
PIP 설치 -R 요구 사항 .txt
2 Timbre Encoder : @mueller91의 스피커-인코더를 다운로드하고 best_model.pth.tar speaker_pretrain/ 에 넣으십시오.
3 속삭임 모델 다중 언어 매체 모델 다운로드, medium.pt 다운로드하고 whisper_pretrain/ 에 넣으십시오.
팁 : Whisper는 내장되어 있습니다. 추가로 설치하지 마십시오. 충돌하고 오류를보고합니다.
4 프리 트레인 모델 maxgan_pretrain_32k.pth를 다운로드하고 테스트하십시오
python svc_inference.py ---config configs/maxgan.yaml ---- 모드 maxgan_pretrain_32k.pth--pk ./configs/singers/singer0001.npy-wave test.wav
자동화하려면이 명령을 사용하십시오.
Python3 준비/EasyProcess.py
또는 다음과 같이 단계별로 :
1, 재 샘플링
16000Hz의 샘플링 속도로 오디오를 생성하십시오
Python prepare/preprocess_a.py -w ./data_raw -o ./data_svc/waves-16k -s 16000
32000Hz의 샘플링 속도로 오디오를 생성하십시오
Python prepar/preprocess_a.py -w ./data_raw -o ./data_svc/waves-32k -s 32000
2, 16K 오디오를 사용하여 피치를 추출하십시오
Python repay/preprocess_f0.py -w data_svc/waves -16k/-p data_svc/pitch
3, 16K 오디오를 사용하여 PPG를 추출하십시오
Python prepar/preprocess_ppg.py -w data_svc/waves -16k/-p data_svc/whisper
4, 16K 오디오를 사용하여 음색 코드를 추출하십시오
Python prepar/preprocess_speaker.py data_svc/waves-16k/data_svc/speaker
5, 추론을 위해 가수 코드를 추출하십시오
Python repay/preprocess_speaker_ave.py data_svc/speaker/data_svc/singer
6, 32K 오디오를 사용하여 교육 색인을 생성하십시오
Python repay/preprocess_train.py
7, 훈련 파일 디버깅
Python repay/preprocess_zzz.py -c configs/maxgan.yaml
data_svc/
└── waves-16k
│ └── speaker0
│ │ ├── 000001.wav
│ │ └── 000xxx.wav
│ └── speaker1
│ ├── 000001.wav
│ └── 000xxx.wav
└── waves-32k
│ └── speaker0
│ │ ├── 000001.wav
│ │ └── 000xxx.wav
│ └── speaker1
│ ├── 000001.wav
│ └── 000xxx.wav
└── pitch
│ └── speaker0
│ │ ├── 000001.pit.npy
│ │ └── 000xxx.pit.npy
│ └── speaker1
│ ├── 000001.pit.npy
│ └── 000xxx.pit.npy
└── whisper
│ └── speaker0
│ │ ├── 000001.ppg.npy
│ │ └── 000xxx.ppg.npy
│ └── speaker1
│ ├── 000001.ppg.npy
│ └── 000xxx.ppg.npy
└── speaker
│ └── speaker0
│ │ ├── 000001.spk.npy
│ │ └── 000xxx.spk.npy
│ └── speaker1
│ ├── 000001.spk.npy
│ └── 000xxx.spk.npy
└── singer
├── speaker0.spk.npy
└── speaker1.spk.npy0, 미리 훈련 된 모델을 기반으로 미세 조정하는 경우 미리 훈련 된 모델을 다운로드해야합니다 : maxgan_pretrain_32k.pth
Pretrain을 설정하십시오 : "./maxgan_pretrain_32k.pth"configs/maxgan.yaml에서 학습 속도를 적절하게 조정하십시오.
1, 훈련을 시작하십시오
python svc_trainer.py -c configs/maxgan.yaml -n svc
2, 훈련을 재개합니다
python svc_trainer.py -c configs/maxgan.yaml -n svc -p chkpt/svc/***. pth
3, 로그를 봅니다
Tensorboard -Logdir logs/

아래의 모든 명령을 수행하는 GUI를 원하는 경우이 명령을 사용하십시오.
python3 svc_gui.py
또는 다음과 같이 단계별로 :
1, 수출 추론 모델
python svc_export.py ---config configs/maxgan.yaml -checkpoint_path chkpt/svc/***. pt
2, GPU 메모리 사용을 줄이기 위해 원 클릭 추론을 사용하지 않고 컨텐츠 인코딩을 추출하기 위해 속삭임을 사용하십시오.
Python Whisper/Inference.py -w test.wav -p test.ppg.npy
3, CSV 텍스트 형식으로 F0 매개 변수를 추출합니다.
Python pitch/inserfern.py -w test.wav -p test.csv
4, 매개 변수를 지정하고 추론하십시오
python svc_inference.py ---config configs/maxgan.yaml ---- 모드 maxgan_g.pth -spk ./data_svc/singers/your_singer.npy-wave test.wav ---ppg test.ppg.npy -pit test.csv
--ppg가 지정 될 때, 동일한 오디오가 여러 번 추론되면 오디오 컨텐츠 코드의 반복적 인 추출을 피할 수 있습니다. 지정되지 않은 경우 자동으로 추출됩니다.
--pit이 지정되면 수동으로 조정 된 F0 매개 변수를로드 할 수 있습니다. 지정되지 않으면 자동으로 추출됩니다.
현재 디렉토리에서 파일을 생성합니다 : svc_out.wav
| args | -코피그 | --모델 | -pr | --파도 | --ppg | --피트 | --옮기다 |
|---|---|---|---|---|---|---|---|
| 이름 | 구성 경로 | 모델 경로 | 스피커 | 웨이브 입력 | 웨이브 PPG | 웨이브 피치 | 피치 시프트 |
5, Vad에 의해 게시됩니다
python svc_inference_post.py --ref test.wav ---svc svc_out.wav-out svc_post.wav
새로운 스피커를위한 멀티 스피커 텍스트 음성 연설 모델의 어댑터 기반 확장
Adaspeech : 사용자 정의 음성을위한 연설에 대한 적응 형 텍스트
https://github.com/nii-yamagishilab/project-nn-pytorch-scripts/tree/master/project/01-nsf
https://github.com/mindslab-ai/univnet [종이]
https://github.com/openai/whisper/ [종이]
https://github.com/nvidia/bigvgan [종이]