Create Test.py
Browse files
Test.py
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from rvc_python.infer import RVCInferene
|
2 |
+
|
3 |
+
|
4 |
+
|
5 |
+
model_path = "/content/rvc/Sonic/Sonic.pth" # @param {type:"string"}
|
6 |
+
|
7 |
+
|
8 |
+
index_path = "/content/rvc/Sonic/added_IVF873_Flat_nprobe_1_Sonic_v2.index" # @param {type:"string"}
|
9 |
+
|
10 |
+
f0up_key = "0" # @param {type:"string"}
|
11 |
+
|
12 |
+
f0method = "rmvpe"
|
13 |
+
|
14 |
+
|
15 |
+
|
16 |
+
rvc = RVCInference(device="cuda:0", model_path=model_path, index_path=index_path)
|
17 |
+
|
18 |
+
rvc.set_params(f0up_key=f0up_key, f0method=f0method)
|
19 |
+
|
20 |
+
rvc.infer_file("/content/sample_data/Example.mp3", "output.wav")
|