Update app.py
Browse files
app.py
CHANGED
|
@@ -44,31 +44,6 @@ except (ValueError, TypeError, IndexError):
|
|
| 44 |
DoFormant, Quefrency, Timbre = False, 1.0, 1.0
|
| 45 |
CSVutil('csvdb/formanting.csv', 'w+', 'formanting', DoFormant, Quefrency, Timbre)
|
| 46 |
|
| 47 |
-
def download_models():
|
| 48 |
-
# Download hubert base model if not present
|
| 49 |
-
if not os.path.isfile('./hubert_base.pt'):
|
| 50 |
-
response = requests.get('https://huggingface.co/lj1995/VoiceConversionWebUI/resolve/main/hubert_base.pt')
|
| 51 |
-
|
| 52 |
-
if response.status_code == 200:
|
| 53 |
-
with open('./hubert_base.pt', 'wb') as f:
|
| 54 |
-
f.write(response.content)
|
| 55 |
-
print("Downloaded hubert base model file successfully. File saved to ./hubert_base.pt.")
|
| 56 |
-
else:
|
| 57 |
-
raise Exception("Failed to download hubert base model file. Status code: " + str(response.status_code) + ".")
|
| 58 |
-
|
| 59 |
-
# Download rmvpe model if not present
|
| 60 |
-
if not os.path.isfile('./rmvpe.pt'):
|
| 61 |
-
response = requests.get('https://drive.usercontent.google.com/download?id=1Hkn4kNuVFRCNQwyxQFRtmzmMBGpQxptI&export=download&authuser=0&confirm=t&uuid=0b3a40de-465b-4c65-8c41-135b0b45c3f7&at=APZUnTV3lA3LnyTbeuduura6Dmi2:1693724254058')
|
| 62 |
-
|
| 63 |
-
if response.status_code == 200:
|
| 64 |
-
with open('./rmvpe.pt', 'wb') as f:
|
| 65 |
-
f.write(response.content)
|
| 66 |
-
print("Downloaded rmvpe model file successfully. File saved to ./rmvpe.pt.")
|
| 67 |
-
else:
|
| 68 |
-
raise Exception("Failed to download rmvpe model file. Status code: " + str(response.status_code) + ".")
|
| 69 |
-
|
| 70 |
-
download_models()
|
| 71 |
-
|
| 72 |
print("\n-------------------------------\nRVC v2 Easy GUI (Local Edition)\n-------------------------------\n")
|
| 73 |
|
| 74 |
def formant_apply(qfrency, tmbre):
|
|
|
|
| 44 |
DoFormant, Quefrency, Timbre = False, 1.0, 1.0
|
| 45 |
CSVutil('csvdb/formanting.csv', 'w+', 'formanting', DoFormant, Quefrency, Timbre)
|
| 46 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
print("\n-------------------------------\nRVC v2 Easy GUI (Local Edition)\n-------------------------------\n")
|
| 48 |
|
| 49 |
def formant_apply(qfrency, tmbre):
|