Update app.py
Browse files
app.py
CHANGED
|
@@ -93,6 +93,32 @@ from infer_rvc_python import BaseLoader
|
|
| 93 |
|
| 94 |
BaseLoader(only_cpu=True, hubert_path="hubert_base.pt", rmvpe_path="rmvpe.pt")
|
| 95 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 96 |
|
| 97 |
def get_file_name(url):
|
| 98 |
match = re.search(pattern_zip, url)
|
|
@@ -498,7 +524,7 @@ def infer_gpu(hubert_model, net_g, audio, f0_up_key, index_file, tgt_sr, version
|
|
| 498 |
|
| 499 |
def rvc_infer_music(url, model_name, song_name, split_model, f0_up_key, vocal_volume, inst_volume):
|
| 500 |
#load_hubert()
|
| 501 |
-
print(hubert_model)
|
| 502 |
url = url.strip().replace(" ", "")
|
| 503 |
model_name = model_name.strip().replace(" ", "")
|
| 504 |
if url.startswith('https://download.openxlab.org.cn/models/'):
|
|
|
|
| 93 |
|
| 94 |
BaseLoader(only_cpu=True, hubert_path="hubert_base.pt", rmvpe_path="rmvpe.pt")
|
| 95 |
|
| 96 |
+
converter.apply_conf(
|
| 97 |
+
tag="yoimiya",
|
| 98 |
+
file_model="model.pth",
|
| 99 |
+
pitch_algo="rmvpe+",
|
| 100 |
+
pitch_lvl=0,
|
| 101 |
+
file_index="model.index",
|
| 102 |
+
index_influence=0.66,
|
| 103 |
+
respiration_median_filtering=3,
|
| 104 |
+
envelope_ratio=0.25,
|
| 105 |
+
consonant_breath_protection=0.33
|
| 106 |
+
)
|
| 107 |
+
|
| 108 |
+
# audio_files = ["audio.wav", "haha.mp3"]
|
| 109 |
+
audio_files = "10.wav"
|
| 110 |
+
|
| 111 |
+
# speakers_list = ["sunshine", "yoimiya"]
|
| 112 |
+
speakers_list = "yoimiya"
|
| 113 |
+
|
| 114 |
+
result = converter(
|
| 115 |
+
audio_files,
|
| 116 |
+
speakers_list,
|
| 117 |
+
overwrite=False,
|
| 118 |
+
parallel_workers=4
|
| 119 |
+
)
|
| 120 |
+
|
| 121 |
+
|
| 122 |
|
| 123 |
def get_file_name(url):
|
| 124 |
match = re.search(pattern_zip, url)
|
|
|
|
| 524 |
|
| 525 |
def rvc_infer_music(url, model_name, song_name, split_model, f0_up_key, vocal_volume, inst_volume):
|
| 526 |
#load_hubert()
|
| 527 |
+
#print(hubert_model)
|
| 528 |
url = url.strip().replace(" ", "")
|
| 529 |
model_name = model_name.strip().replace(" ", "")
|
| 530 |
if url.startswith('https://download.openxlab.org.cn/models/'):
|