ArianatorQualquer commited on
Commit
6af679d
1 Parent(s): 9332717

Rename K.py to Dl.py

Browse files
Files changed (2) hide show
  1. Dl.py +21 -0
  2. K.py +0 -13
Dl.py ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import subprocess
3
+
4
+ # Diret贸rio de destino
5
+ destination_directory = "/content/Advanced-RVC-Inference"
6
+
7
+ # URLs dos modelos
8
+ hubert_url = "https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/hubert_base.pt"
9
+ rmvpe_url = "https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/rmvpe.pt"
10
+
11
+ # Fun莽茫o para fazer o download com wget
12
+ def download_with_wget(url, output_file):
13
+ subprocess.call(["wget", "-c", "--tries=0", "--read-timeout=5", "--timeout=60", "--waitretry=5", "--quiet", "--show-progress", "-O", output_file, url])
14
+
15
+ # Verifica se o diret贸rio de destino existe, sen茫o, cria
16
+ if not os.path.exists(destination_directory):
17
+ os.makedirs(destination_directory)
18
+
19
+ # Realiza os downloads
20
+ download_with_wget(hubert_url, os.path.join(destination_directory, "hubert_base.pt"))
21
+ download_with_wget(rmvpe_url, os.path.join(destination_directory, "rmvpe.pt"))
K.py DELETED
@@ -1,13 +0,0 @@
1
- import os
2
-
3
- # Download Hubert Model
4
- hubert_url = "https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/hubert_base.pt"
5
- hubert_destination = "/content/Advanced-RVC-Inference/hubert_base.pt"
6
-
7
- os.system(f"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M {hubert_url} -d /content/Advanced-RVC-Inference -o hubert_base.pt")
8
-
9
- # Download RMVPE Model
10
- rmvpe_url = "https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/rmvpe.pt"
11
- rmvpe_destination = "/content/Advanced-RVC-Inference/rmvpe.pt"
12
-
13
- os.system(f"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M {rmvpe_url} -d /content/Advanced-RVC-Inference -o rmvpe.pt")