kevinwang676 commited on
Commit
778472c
1 Parent(s): 8520e8d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -16
app.py CHANGED
@@ -92,9 +92,19 @@ hubert_model.eval()
92
  from infer_rvc_python import BaseLoader
93
 
94
  #converter = BaseLoader(only_cpu=True, hubert_path="hubert_base.pt", rmvpe_path="rmvpe.pt")
95
- converter = BaseLoader(only_cpu=True, hubert_path=None, rmvpe_path=None)
 
 
 
 
 
 
 
 
 
 
96
 
97
- converter.apply_conf(
98
  tag="yoimiya",
99
  file_model="model.pth",
100
  pitch_algo="rmvpe+",
@@ -104,21 +114,9 @@ converter.apply_conf(
104
  respiration_median_filtering=3,
105
  envelope_ratio=0.25,
106
  consonant_breath_protection=0.33
107
- )
108
-
109
- # audio_files = ["audio.wav", "haha.mp3"]
110
- audio_files = "10.wav"
111
-
112
- # speakers_list = ["sunshine", "yoimiya"]
113
- speakers_list = "yoimiya"
114
-
115
- result = converter(
116
- audio_files,
117
- speakers_list,
118
- overwrite=False,
119
- parallel_workers=4
120
- )
121
 
 
122
 
123
 
124
  def get_file_name(url):
 
92
  from infer_rvc_python import BaseLoader
93
 
94
  #converter = BaseLoader(only_cpu=True, hubert_path="hubert_base.pt", rmvpe_path="rmvpe.pt")
95
+ #converter = BaseLoader(only_cpu=True, hubert_path=None, rmvpe_path=None)
96
+
97
+ def convert_now(audio_files, random_tag, converter):
98
+ return converter(
99
+ audio_files,
100
+ random_tag,
101
+ overwrite=False,
102
+ parallel_workers=8
103
+ )
104
+
105
+ converter_test = BaseLoader(only_cpu=True, hubert_path=None, rmvpe_path=None)
106
 
107
+ converter_test.apply_conf(
108
  tag="yoimiya",
109
  file_model="model.pth",
110
  pitch_algo="rmvpe+",
 
114
  respiration_median_filtering=3,
115
  envelope_ratio=0.25,
116
  consonant_breath_protection=0.33
117
+ )
 
 
 
 
 
 
 
 
 
 
 
 
 
118
 
119
+ convert_now("10.wav", "test", converter_test)
120
 
121
 
122
  def get_file_name(url):