Spaces:
Runtime error
Runtime error
Update inference/mastering_transfer.py
Browse files
inference/mastering_transfer.py
CHANGED
@@ -90,19 +90,19 @@ class Mastering_Style_Transfer_Inference:
|
|
90 |
input_aud = load_wav_segment(input_track_path, axis=0)
|
91 |
reference_aud = load_wav_segment(reference_track_path, axis=0)
|
92 |
|
93 |
-
cur_out_dir =
|
94 |
os.makedirs(cur_out_dir, exist_ok=True)
|
95 |
''' segmentize whole songs into batch '''
|
96 |
if input_aud.shape[1] > self.args.segment_length:
|
97 |
cur_inst_input_stem = self.batchwise_segmentization(input_aud, \
|
98 |
-
|
99 |
segment_length=self.args.segment_length, \
|
100 |
discard_last=False)
|
101 |
else:
|
102 |
cur_inst_input_stem = [input_aud.unsqueeze(0)]
|
103 |
if reference_aud.shape[1] > self.args.segment_length*2:
|
104 |
cur_inst_reference_stem = self.batchwise_segmentization(reference_aud, \
|
105 |
-
|
106 |
segment_length=self.args.segment_length_ref, \
|
107 |
discard_last=False)
|
108 |
else:
|
|
|
90 |
input_aud = load_wav_segment(input_track_path, axis=0)
|
91 |
reference_aud = load_wav_segment(reference_track_path, axis=0)
|
92 |
|
93 |
+
cur_out_dir = './yt_dir/0/'
|
94 |
os.makedirs(cur_out_dir, exist_ok=True)
|
95 |
''' segmentize whole songs into batch '''
|
96 |
if input_aud.shape[1] > self.args.segment_length:
|
97 |
cur_inst_input_stem = self.batchwise_segmentization(input_aud, \
|
98 |
+
"input", \
|
99 |
segment_length=self.args.segment_length, \
|
100 |
discard_last=False)
|
101 |
else:
|
102 |
cur_inst_input_stem = [input_aud.unsqueeze(0)]
|
103 |
if reference_aud.shape[1] > self.args.segment_length*2:
|
104 |
cur_inst_reference_stem = self.batchwise_segmentization(reference_aud, \
|
105 |
+
"reference", \
|
106 |
segment_length=self.args.segment_length_ref, \
|
107 |
discard_last=False)
|
108 |
else:
|