File size: 2,431 Bytes
5788b15
 
 
 
 
 
 
 
de479a3
d1c75d1
e51c408
 
d1c75d1
 
 
 
 
 
 
 
 
 
de479a3
d1c75d1
 
14cc766
 
 
 
d1c75d1
c3feba5
d1c75d1
de479a3
d1c75d1
 
 
 
 
 
 
 
 
 
 
 
de479a3
d1c75d1
 
14cc766
 
 
 
 
d1c75d1
c3feba5
d1c75d1
de479a3
d1c75d1
 
 
c3feba5
d1c75d1
5788b15
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
---
title: Dotdemo
emoji: 😻
colorFrom: indigo
colorTo: pink
sdk: static
pinned: false
---
**You can skip this step now**, as it's only used to download the codebase and the docker image
1. ``` bash
   git lfs install # Follow this thread https://askubuntu.com/questions/799341/how-to-install-git-lfs-on-ubuntu-16-04
   git clone https://huggingface.co/spaces/fantasyfish/dotdemo
   cd third_party
   git clone https://huggingface.co/spaces/fantasyfish/RVC
   ```
2. ```bash
   sudo docker pull fantasyfish677/rvc:v0
   ```



# Training server
1. Start the server with the command below where the **input bucket** is mapped to **_/inputDir_**. This bucket should include several folders, where each folder contains the audio files from each user.
  ```bash
  sudo docker run --gpus all --runtime=nvidia --rm \ 
  -v /home/ubuntu/dotdemo/third_party:/third_party \
  -v /home/ubuntu/dotdemo/examples:/inputDir \
  -v /home/ubuntu/dotdemo/logs:/logs \
  -v /home/ubuntu/dotdemo/train_server:/app \
  -p 8080:8080 \
  -it fantasyfish677/rvc:v0
  ```
2. Two test commands. The first is to trigger the training process and the second is to check whether training has finished
   ```bash
   curl -X GET http://localhost:8080/train \
   -H 'Content-Type: application/json' \
   -d '{"expName":"drake-20","trainsetDir":"drake"}'
   ``` 
   ```bash
   curl -X GET http://localhost:8080/check \
   -H 'Content-Type: application/json' \
   -d '{"expName":"drake-20"}'
   ```

# Inference server
1. Start the server with the command below where the **input bucket** is mapped to **_/inputDir_** and the **output bucket** is mapped to **_/outputDir_**.
  ```bash
  sudo docker run --gpus all --runtime=nvidia --rm \
    -v /home/ubuntu/dotdemo/third_party:/third_party \
    -v /home/ubuntu/dotdemo/examples:/inputDir \
    -v /home/ubuntu/dotdemo/logs:/logs \
    -v /home/ubuntu/dotdemo/results:/outputDir \
    -v /home/ubuntu/dotdemo/inference_server:/app \
    -p 8081:8081 \
    -it fantasyfish677/rvc:v0
  ```
2. Test command. If transfer a male vocal into female, recommend set **_pitchShift_** to 10. If transfer a female vocal into male, recommend set **_pitchShift_** to -10. Otherwise, keep it as 0. 
   ```bash
   curl -X GET http://localhost:8081/inference \
   -H 'Content-Type: application/json' \
   -d '{"expName":"drake-20","audioFileName":"radwimps.mp3", "pitchShift": 0, "saveFileName":"radwimps_drake-20.wav"}'
   ```