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