Add files via upload

This commit is contained in:
RVC-Boss 2023-12-26 22:24:04 +08:00 committed by GitHub
parent 8bd34d1881
commit e56584c6e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -307,14 +307,14 @@ class AudioPreDeEcho:
sf.write(
os.path.join(
ins_root,
"instrument_{}_{}.{}".format(name, self.data["agg"], format),
"vocal_{}_{}.{}".format(name, self.data["agg"], format),
),
(np.array(wav_instrument) * 32768).astype("int16"),
self.mp.param["sr"],
) #
else:
path = os.path.join(
ins_root, "instrument_{}_{}.wav".format(name, self.data["agg"])
ins_root, "vocal_{}_{}.wav".format(name, self.data["agg"])
)
sf.write(
path,
@ -344,14 +344,14 @@ class AudioPreDeEcho:
sf.write(
os.path.join(
vocal_root,
"vocal_{}_{}.{}".format(name, self.data["agg"], format),
"instrument_{}_{}.{}".format(name, self.data["agg"], format),
),
(np.array(wav_vocals) * 32768).astype("int16"),
self.mp.param["sr"],
)
else:
path = os.path.join(
vocal_root, "vocal_{}_{}.wav".format(name, self.data["agg"])
vocal_root, "instrument_{}_{}.wav".format(name, self.data["agg"])
)
sf.write(
path,