From d91ca14680475a7ca81dea275bc5980e70715368 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 27 Dec 2024 14:29:21 +0000 Subject: [PATCH] chore(format): run black on main --- rvc/lib/utils.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/rvc/lib/utils.py b/rvc/lib/utils.py index 9c1c8ddf..d20286a2 100644 --- a/rvc/lib/utils.py +++ b/rvc/lib/utils.py @@ -1,4 +1,4 @@ -import os +import os import sys import soxr import librosa @@ -41,7 +41,9 @@ def load_audio(file, sample_rate): if len(audio.shape) > 1: audio = librosa.to_mono(audio.T) if sr != sample_rate: - audio = librosa.resample(audio, orig_sr=sr, target_sr=sample_rate, res_type="soxr_vhq") + audio = librosa.resample( + audio, orig_sr=sr, target_sr=sample_rate, res_type="soxr_vhq" + ) except Exception as error: raise RuntimeError(f"An error occurred loading the audio: {error}") @@ -62,7 +64,9 @@ def load_audio_infer( if len(audio.shape) > 1: audio = librosa.to_mono(audio.T) if sr != sample_rate: - audio = librosa.resample(audio, orig_sr=sr, target_sr=sample_rate, res_type="soxr_vhq") + audio = librosa.resample( + audio, orig_sr=sr, target_sr=sample_rate, res_type="soxr_vhq" + ) if formant_shifting: formant_qfrency = kwargs.get("formant_qfrency", 0.8) formant_timbre = kwargs.get("formant_timbre", 0.8)