Update gui.py

This commit is contained in:
RVC-Boss 2023-05-07 17:40:09 +00:00 committed by GitHub
parent f695fe60f6
commit 5928d5358c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

8
gui.py
View File

@ -1,4 +1,4 @@
import os, sys
import os, sys,traceback
now_dir = os.getcwd()
sys.path.append(now_dir)
@ -39,7 +39,7 @@ class RVC:
if index_rate != 0:
self.index = faiss.read_index(index_path)
# self.big_npy = np.load(npy_path)
self.big_npy = index.reconstruct_n(0, self.index.ntotal)
self.big_npy = self.index.reconstruct_n(0, self.index.ntotal)
print("index search enabled")
self.index_rate = index_rate
model_path = hubert_path
@ -64,8 +64,8 @@ class RVC:
print(self.net_g.load_state_dict(cpt["weight"], strict=False))
self.net_g.eval().to(device)
self.net_g.half()
except Exception as e:
print(e)
except:
print(traceback.format_exc())
def get_f0(self, x, f0_up_key, inp_f0=None):
x_pad = 1