2023-04-19 07:35:37 +03:00
|
|
|
## For Developper
|
|
|
|
|
2023-04-19 18:43:28 +03:00
|
|
|
[Japanese](/README_dev_ja.md)
|
2023-04-19 07:35:37 +03:00
|
|
|
|
|
|
|
## Prerequisit
|
|
|
|
|
|
|
|
- Linux or WSL2 (not tested for Mac )
|
|
|
|
- Anaconda
|
|
|
|
|
|
|
|
## Preparation
|
|
|
|
|
|
|
|
1. Create anaconda virtual environment
|
|
|
|
|
|
|
|
```
|
|
|
|
$ conda create -n vcclient-dev python=3.10
|
|
|
|
$ conda activate vcclient-dev
|
|
|
|
```
|
|
|
|
|
|
|
|
2. clone repository
|
|
|
|
|
|
|
|
```
|
|
|
|
$ git clone https://github.com/w-okada/voice-changer.git
|
|
|
|
```
|
|
|
|
|
|
|
|
## For Server Developer
|
2023-07-09 21:46:19 +03:00
|
|
|
|
2023-06-27 01:06:06 +03:00
|
|
|
1. Install requirements
|
2023-04-19 07:35:37 +03:00
|
|
|
|
|
|
|
```
|
2023-06-27 02:13:29 +03:00
|
|
|
$ cd voice-changer/server
|
2023-04-19 07:35:37 +03:00
|
|
|
$ pip install -r requirements.txt
|
|
|
|
```
|
|
|
|
|
2023-06-27 01:06:06 +03:00
|
|
|
2. Run server
|
2023-04-19 07:35:37 +03:00
|
|
|
|
|
|
|
Run server with the below command. You can replace the path to each weight.
|
|
|
|
|
|
|
|
```
|
|
|
|
$ python3 MMVCServerSIO.py -p 18888 --https true \
|
2023-07-09 21:46:19 +03:00
|
|
|
--content_vec_500 pretrain/checkpoint_best_legacy_500.pt \
|
|
|
|
--content_vec_500_onnx pretrain/content_vec_500.onnx \
|
|
|
|
--content_vec_500_onnx_on true \
|
|
|
|
--hubert_base pretrain/hubert_base.pt \
|
|
|
|
--hubert_base_jp pretrain/rinna_hubert_base_jp.pt \
|
|
|
|
--hubert_soft pretrain/hubert/hubert-soft-0d54a1f4.pt \
|
|
|
|
--nsf_hifigan pretrain/nsf_hifigan/model \
|
|
|
|
--crepe_onnx_full pretrain/crepe_onnx_full.onnx \
|
|
|
|
--crepe_onnx_tiny pretrain/crepe_onnx_tiny.onnx \
|
2023-07-17 03:21:35 +03:00
|
|
|
--rmvpe pretrain/rmvpe.pt \
|
2023-07-09 21:46:19 +03:00
|
|
|
--model_dir model_dir \
|
|
|
|
--samples samples.json
|
|
|
|
|
2023-04-19 07:35:37 +03:00
|
|
|
```
|
|
|
|
|
2023-06-27 01:06:06 +03:00
|
|
|
2-1. Trouble shoot
|
|
|
|
|
|
|
|
(1) OSError: PortAudio library not found
|
|
|
|
If you get the message below, you shold install additional library.
|
2023-07-09 21:46:19 +03:00
|
|
|
|
2023-06-27 01:06:06 +03:00
|
|
|
```
|
|
|
|
OSError: PortAudio library not found
|
|
|
|
```
|
|
|
|
|
|
|
|
You can install the library this command.
|
|
|
|
|
|
|
|
```
|
|
|
|
$ sudo apt-get install libportaudio2
|
|
|
|
$ sudo apt-get install libasound-dev
|
|
|
|
```
|
|
|
|
|
|
|
|
3. Enjoy developing.
|
2023-04-19 07:35:37 +03:00
|
|
|
|
2023-07-09 21:46:19 +03:00
|
|
|
### Appendix
|
2023-06-27 12:24:01 +03:00
|
|
|
|
|
|
|
1. Win + Anaconda (not supported)
|
|
|
|
|
|
|
|
use conda to install pytorch
|
2023-07-09 21:46:19 +03:00
|
|
|
|
2023-06-27 12:24:01 +03:00
|
|
|
```
|
|
|
|
conda install pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia
|
|
|
|
```
|
|
|
|
|
|
|
|
Also run these command.
|
2023-07-09 21:46:19 +03:00
|
|
|
|
2023-06-27 12:24:01 +03:00
|
|
|
```
|
2023-07-09 21:46:19 +03:00
|
|
|
pip install chardet
|
2023-06-27 12:24:01 +03:00
|
|
|
pip install numpy==1.24.0
|
|
|
|
```
|
|
|
|
|
2023-04-19 07:35:37 +03:00
|
|
|
## For Client Developer
|
|
|
|
|
|
|
|
1. Import modules and initial build
|
|
|
|
|
|
|
|
```
|
|
|
|
cd client
|
|
|
|
cd lib
|
|
|
|
npm install
|
|
|
|
npm run build:dev
|
|
|
|
cd ../demo
|
|
|
|
npm install
|
|
|
|
npm run build:dev
|
|
|
|
```
|
|
|
|
|
|
|
|
2. Enjoy developing.
|