jhtonyKoo commited on
Commit
12de70d
1 Parent(s): 2333a4e

Update inference/mastering_transfer.py

Browse files
Files changed (1) hide show
  1. inference/mastering_transfer.py +3 -3
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 = dir_name[0].replace(self.target_dir, self.output_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
- dir_name[0], \
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
- dir_name[0], \
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: