1
0
mirror of synced 2024-11-27 17:00:54 +01:00

optimize: move slicer2, rmvpe, my_utils to lib

This commit is contained in:
源文雨 2023-07-24 14:16:58 +08:00
parent 451630a2a4
commit 8364750272
9 changed files with 9 additions and 10 deletions

View File

@ -2,7 +2,7 @@ import os, traceback, sys, parselmouth
now_dir = os.getcwd()
sys.path.append(now_dir)
from my_utils import load_audio
from lib.audio import load_audio
import pyworld
import numpy as np, logging

View File

@ -33,7 +33,7 @@ from lib.infer_pack.models import (
)
from lib.infer_pack.models_onnx import SynthesizerTrnMsNSFsidM
from infer_uvr5 import _audio_pre_, _audio_pre_new
from my_utils import load_audio
from lib.audio import load_audio
from lib.train.process_ckpt import change_info, extract_small_model, merge, show_info
from vc_infer_pipeline import VC
from sklearn.cluster import MiniBatchKMeans

View File

@ -116,7 +116,7 @@ from lib.infer_pack.models import (
SynthesizerTrnMs768NSFsid,
SynthesizerTrnMs768NSFsid_nono,
)
from my_utils import load_audio
from lib.audio import load_audio
from fairseq import checkpoint_utils
from scipy.io import wavfile

View File

@ -1,6 +1,5 @@
import sys, torch, numpy as np, traceback, pdb
import torch, numpy as np
import torch.nn as nn
from time import time as ttime
import torch.nn.functional as F
@ -247,7 +246,7 @@ class E2E(nn.Module):
)
else:
self.fc = nn.Sequential(
nn.Linear(3 * N_MELS, N_CLASS), nn.Dropout(0.25), nn.Sigmoid()
nn.Linear(3 * nn.N_MELS, nn.N_CLASS), nn.Dropout(0.25), nn.Sigmoid()
)
def forward(self, mel):

View File

@ -196,7 +196,7 @@ class RVC:
def get_f0_rmvpe(self, x, f0_up_key):
if hasattr(self, "model_rmvpe") == False:
from rmvpe import RMVPE
from lib.rmvpe import RMVPE
print("loading rmvpe model")
self.model_rmvpe = RMVPE(

View File

@ -10,11 +10,11 @@ n_p = int(sys.argv[3])
exp_dir = sys.argv[4]
noparallel = sys.argv[5] == "True"
import numpy as np, os, traceback
from slicer2 import Slicer
from lib.slicer2 import Slicer
import librosa, traceback
from scipy.io import wavfile
import multiprocessing
from my_utils import load_audio
from lib.audio import load_audio
mutex = multiprocessing.Lock()
f = open("%s/preprocess.log" % exp_dir, "a+")

View File

@ -129,7 +129,7 @@ class VC(object):
f0 = f0[0].cpu().numpy()
elif f0_method == "rmvpe":
if hasattr(self, "model_rmvpe") == False:
from rmvpe import RMVPE
from lib.rmvpe import RMVPE
print("loading rmvpe model")
self.model_rmvpe = RMVPE(