From 0f3f56b51ad364f389d27f0f9765e7d085aff767 Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Mon, 17 Jul 2023 17:14:53 -0400 Subject: [PATCH] handle single file input/output --- voice_conversion/rvc-v2-brandon/fakeyou_infer.py | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/voice_conversion/rvc-v2-brandon/fakeyou_infer.py b/voice_conversion/rvc-v2-brandon/fakeyou_infer.py index b848582..bd180c7 100644 --- a/voice_conversion/rvc-v2-brandon/fakeyou_infer.py +++ b/voice_conversion/rvc-v2-brandon/fakeyou_infer.py @@ -248,12 +248,10 @@ def get_vc(model_path): get_vc(model_path) -audios = os.listdir(input_path) -for file in tq.tqdm(audios): - if file.endswith(".wav"): - file_path = input_path + "/" + file - wav_opt = vc_single( - 0, file_path, f0up_key, None, f0method, index_path, index_rate - ) - out_path = opt_path + "/" + file - wavfile.write(out_path, tgt_sr, wav_opt) + +file_path = input_path +wav_opt = vc_single( + 0, file_path, f0up_key, None, f0method, index_path, index_rate +) +out_path = opt_path +wavfile.write(out_path, tgt_sr, wav_opt)