mirror of
https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI.git
synced 2026-01-20 02:51:09 +00:00
repair app.py
This commit is contained in:
@@ -29,7 +29,9 @@ class VC:
|
||||
|
||||
self.config = config
|
||||
|
||||
def get_vc(self, sid, to_return_protect0, to_return_protect1):
|
||||
def get_vc(self, sid, *to_return_protect):
|
||||
print("aosdijfaofjoaij")
|
||||
print(to_return_protect)
|
||||
person = f'{os.getenv("weight_root")}/{sid}'
|
||||
print(f"loading {person}")
|
||||
|
||||
@@ -41,12 +43,16 @@ class VC:
|
||||
|
||||
to_return_protect0 = {
|
||||
"visible": self.if_f0 != 0,
|
||||
"value": to_return_protect0 if self.if_f0 != 0 else 0.5,
|
||||
"value": to_return_protect[0]
|
||||
if self.if_f0 != 0 and to_return_protect
|
||||
else 0.5,
|
||||
"__type__": "update",
|
||||
}
|
||||
to_return_protect1 = {
|
||||
"visible": self.if_f0 != 0,
|
||||
"value": to_return_protect1 if self.if_f0 != 0 else 0.33,
|
||||
"value": to_return_protect[1]
|
||||
if self.if_f0 != 0 and to_return_protect
|
||||
else 0.33,
|
||||
"__type__": "update",
|
||||
}
|
||||
|
||||
@@ -75,11 +81,15 @@ class VC:
|
||||
index = {"value": get_index_path_from_model(sid), "__type__": "update"}
|
||||
|
||||
return (
|
||||
{"visible": True, "maximum": n_spk, "__type__": "update"},
|
||||
to_return_protect0,
|
||||
to_return_protect1,
|
||||
index,
|
||||
index,
|
||||
(
|
||||
{"visible": True, "maximum": n_spk, "__type__": "update"},
|
||||
to_return_protect0,
|
||||
to_return_protect1,
|
||||
index,
|
||||
index,
|
||||
)
|
||||
if to_return_protect
|
||||
else {"visible": True, "maximum": n_spk, "__type__": "update"}
|
||||
)
|
||||
|
||||
def vc_single(
|
||||
|
||||
Reference in New Issue
Block a user