JacobLinCool commited on
Commit
a365fcd
1 Parent(s): ca46567

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -18,14 +18,14 @@ def split(client, audio):
18
  return result[0], result[1]
19
 
20
  @spaces.GPU
21
- def convert(model, vocal, pitch_modification):
22
- rvc = RVC.from_pretrained(model)
23
- samples = rvc.convert(vocal, pitch_modification=pitch_modification)
24
- return samples
25
 
26
  def process_audio(client, model, audio, pitch_modification):
27
  vocal, bgm = split(client, audio)
28
- samples = convert(model, vocal, pitch_modification)
 
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