Spaces:
Sleeping
Sleeping
JacobLinCool
commited on
Commit
•
a365fcd
1
Parent(s):
ca46567
Update app.py
Browse files
app.py
CHANGED
@@ -18,14 +18,14 @@ def split(client, audio):
|
|
18 |
return result[0], result[1]
|
19 |
|
20 |
@spaces.GPU
|
21 |
-
def convert(
|
22 |
-
|
23 |
-
|
24 |
-
return samples
|
25 |
|
26 |
def process_audio(client, model, audio, pitch_modification):
|
27 |
vocal, bgm = split(client, audio)
|
28 |
-
|
|
|
29 |
|
30 |
sf.write("vocal.wav", samples, rvc.sr)
|
31 |
|
|
|
18 |
return result[0], result[1]
|
19 |
|
20 |
@spaces.GPU
|
21 |
+
def convert(rvc, vocal, pitch_modification):
|
22 |
+
samples = rvc.convert(vocal, pitch_modification=pitch_modification)
|
23 |
+
return samples
|
|
|
24 |
|
25 |
def process_audio(client, model, audio, pitch_modification):
|
26 |
vocal, bgm = split(client, audio)
|
27 |
+
rvc = RVC.from_pretrained(model)
|
28 |
+
samples = convert(rvc, vocal, pitch_modification)
|
29 |
|
30 |
sf.write("vocal.wav", samples, rvc.sr)
|
31 |
|