From b402f9dbdfdebebc088edc15ee47439c9f27c038 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=AD=90?= <54951765+kslz@users.noreply.github.com> Date: Wed, 30 Nov 2022 15:32:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dweb=E7=95=8C=E9=9D=A2vc?= =?UTF-8?q?=E6=A8=A1=E5=BC=8F=E4=B8=8D=E8=83=BD=E7=94=A8=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E3=80=82=E6=94=B9=E6=8B=BC=E5=86=99=E9=94=99=E8=AF=AF=E3=80=81?= =?UTF-8?q?=E7=BB=99=E5=AD=97=E7=AC=A6=E4=B8=B2=E5=89=8D=E5=8A=A0f?= =?UTF-8?q?=E6=A0=87=20(#790)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mkgui/app_vc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mkgui/app_vc.py b/mkgui/app_vc.py index 1d69b4a2..e4012e64 100644 --- a/mkgui/app_vc.py +++ b/mkgui/app_vc.py @@ -18,7 +18,7 @@ # Constants -AUDIO_SAMPLES_DIR = f'sample{os.sep}' +AUDIO_SAMPLES_DIR = f'samples{os.sep}' EXT_MODELS_DIRT = f'ppg_extractor{os.sep}saved_models' CONV_MODELS_DIRT = f'ppg2mel{os.sep}saved_models' VOC_MODELS_DIRT = f'vocoder{os.sep}saved_models' @@ -134,7 +134,7 @@ def convert(input: Input) -> Output: # Import necessary dependency of Voice Conversion from utils.f0_utils import compute_f0, f02lf0, compute_mean_std, get_converted_lf0uv ref_lf0_mean, ref_lf0_std = compute_mean_std(f02lf0(compute_f0(ref_wav))) - speacker_encoder.load_model(Path("encoder{os.sep}saved_models{os.sep}pretrained_bak_5805000.pt")) + speacker_encoder.load_model(Path(f"encoder{os.sep}saved_models{os.sep}pretrained_bak_5805000.pt")) embed = speacker_encoder.embed_utterance(ref_wav) lf0_uv = get_converted_lf0uv(src_wav, ref_lf0_mean, ref_lf0_std, convert=True) min_len = min(ppg.shape[1], len(lf0_uv))