jhtonyKoo commited on
Commit
23b9137
1 Parent(s): 1a135ff

modify app

Browse files
Files changed (2) hide show
  1. app.py +4 -1
  2. inference.py +0 -5
app.py CHANGED
@@ -41,6 +41,9 @@ def process_audio(input_audio, reference_audio):
41
  elif output_audio.ndim > 2:
42
  output_audio = output_audio.squeeze()
43
 
 
 
 
44
  return (sr, output_audio), param_output
45
 
46
  def perform_ito(input_audio, reference_audio, ito_reference_audio, num_steps, optimizer, learning_rate, af_weights):
@@ -96,7 +99,7 @@ with gr.Blocks() as demo:
96
  process_button = gr.Button("Process Mastering Style Transfer")
97
 
98
  with gr.Row():
99
- output_audio = gr.Audio(label="Output Audio")
100
  param_output = gr.Textbox(label="Predicted Parameters", lines=10)
101
 
102
  process_button.click(
 
41
  elif output_audio.ndim > 2:
42
  output_audio = output_audio.squeeze()
43
 
44
+ print(output_audio.shape)
45
+ print(param_output)
46
+
47
  return (sr, output_audio), param_output
48
 
49
  def perform_ito(input_audio, reference_audio, ito_reference_audio, num_steps, optimizer, learning_rate, af_weights):
 
99
  process_button = gr.Button("Process Mastering Style Transfer")
100
 
101
  with gr.Row():
102
+ output_audio = gr.Audio(label="Output Audio", type='tuple')
103
  param_output = gr.Textbox(label="Predicted Parameters", lines=10)
104
 
105
  process_button.click(
inference.py CHANGED
@@ -349,8 +349,3 @@ if __name__ == "__main__":
349
  args.input_path, args.reference_path, args.ito_reference_path, ito_config, args.perform_ito
350
  )
351
 
352
- # Save the output audio
353
- sf.write("output_mastered.wav", output_audio.T, sr)
354
- if ito_output_audio is not None:
355
- sf.write("ito_output_mastered.wav", ito_output_audio.T, sr)
356
-
 
349
  args.input_path, args.reference_path, args.ito_reference_path, ito_config, args.perform_ito
350
  )
351