jhtonyKoo commited on
Commit
a8cb9ce
1 Parent(s): bf776b2

modify app

Browse files
Files changed (1) hide show
  1. inference.py +7 -0
inference.py CHANGED
@@ -155,13 +155,20 @@ class MasteringStyleTransfer:
155
  return data_tensor.to(self.device)
156
 
157
  def process_audio(self, input_audio, reference_audio, ito_reference_audio, params, perform_ito, log_ito=False):
 
158
  input_tensor = self.preprocess_audio(input_audio, self.args.sample_rate)
159
  reference_tensor = self.preprocess_audio(reference_audio, self.args.sample_rate)
160
  ito_reference_tensor = self.preprocess_audio(ito_reference_audio, self.args.sample_rate)
 
161
 
162
  reference_feature = self.get_reference_embedding(reference_tensor)
163
 
 
 
164
  output_audio, predicted_params = self.mastering_style_transfer(input_tensor, reference_feature)
 
 
 
165
  if perform_ito:
166
  ito_log = []
167
  for i in range(self.args.max_iter_ito):
 
155
  return data_tensor.to(self.device)
156
 
157
  def process_audio(self, input_audio, reference_audio, ito_reference_audio, params, perform_ito, log_ito=False):
158
+ print('run preprocess')
159
  input_tensor = self.preprocess_audio(input_audio, self.args.sample_rate)
160
  reference_tensor = self.preprocess_audio(reference_audio, self.args.sample_rate)
161
  ito_reference_tensor = self.preprocess_audio(ito_reference_audio, self.args.sample_rate)
162
+ print('preprocess done')
163
 
164
  reference_feature = self.get_reference_embedding(reference_tensor)
165
 
166
+ print('reference extracted')
167
+
168
  output_audio, predicted_params = self.mastering_style_transfer(input_tensor, reference_feature)
169
+
170
+ print('style transfer forward done')
171
+
172
  if perform_ito:
173
  ito_log = []
174
  for i in range(self.args.max_iter_ito):