mirror of
https://github.com/fumiama/Retrieval-based-Voice-Conversion-WebUI.git
synced 2026-06-06 17:50:25 +08:00
chore(format): run black on dev (#101)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
5969314e8d
commit
51c85fcc49
@@ -207,12 +207,21 @@ class Predictor:
|
||||
sources = self.demix(mix.T)
|
||||
opt = sources[0].T
|
||||
save_audio(
|
||||
"%s/vocal_%s.%s" % (vocal_root, basename, format), mix - opt, rate, True, format=format,
|
||||
"%s/vocal_%s.%s" % (vocal_root, basename, format),
|
||||
mix - opt,
|
||||
rate,
|
||||
True,
|
||||
format=format,
|
||||
)
|
||||
save_audio(
|
||||
"%s/instrument_%s.%s" % (others_root, basename, format), opt, rate, True, format=format,
|
||||
"%s/instrument_%s.%s" % (others_root, basename, format),
|
||||
opt,
|
||||
rate,
|
||||
True,
|
||||
format=format,
|
||||
)
|
||||
|
||||
|
||||
class MDXNetDereverb:
|
||||
def __init__(self, chunks, device):
|
||||
self.onnx = "assets/uvr5_weights/onnx_dereverb_By_FoxJoy"
|
||||
|
||||
@@ -119,7 +119,10 @@ class AudioPre:
|
||||
if ins_root is not None:
|
||||
if self.data["high_end_process"].startswith("mirroring"):
|
||||
input_high_end_ = spec_utils.mirroring(
|
||||
self.data["high_end_process"], y_spec_m, input_high_end, self.mp.param["pre_filter_start"]
|
||||
self.data["high_end_process"],
|
||||
y_spec_m,
|
||||
input_high_end,
|
||||
self.mp.param["pre_filter_start"],
|
||||
)
|
||||
wav_instrument = spec_utils.cmb_spectrogram_to_wave(
|
||||
y_spec_m, self.mp, input_high_end_h, input_high_end_
|
||||
@@ -139,7 +142,7 @@ class AudioPre:
|
||||
wav_instrument,
|
||||
self.mp.param["sr"],
|
||||
f32=True,
|
||||
format=format
|
||||
format=format,
|
||||
)
|
||||
if vocal_root is not None:
|
||||
if self.is_reverse:
|
||||
@@ -148,7 +151,10 @@ class AudioPre:
|
||||
head = "vocal_"
|
||||
if self.data["high_end_process"].startswith("mirroring"):
|
||||
input_high_end_ = spec_utils.mirroring(
|
||||
self.data["high_end_process"], v_spec_m, input_high_end, self.mp.param["pre_filter_start"]
|
||||
self.data["high_end_process"],
|
||||
v_spec_m,
|
||||
input_high_end,
|
||||
self.mp.param["pre_filter_start"],
|
||||
)
|
||||
wav_vocals = spec_utils.cmb_spectrogram_to_wave(
|
||||
v_spec_m, self.mp, input_high_end_h, input_high_end_
|
||||
@@ -164,5 +170,5 @@ class AudioPre:
|
||||
wav_vocals,
|
||||
self.mp.param["sr"],
|
||||
f32=True,
|
||||
format=format
|
||||
format=format,
|
||||
)
|
||||
|
||||
@@ -252,8 +252,7 @@ class VC:
|
||||
try:
|
||||
tgt_sr, audio_opt = opt
|
||||
save_audio(
|
||||
"%s/%s.%s"
|
||||
% (opt_root, os.path.basename(path), format1),
|
||||
"%s/%s.%s" % (opt_root, os.path.basename(path), format1),
|
||||
audio_opt,
|
||||
tgt_sr,
|
||||
f32=True,
|
||||
|
||||
Reference in New Issue
Block a user