ziqiangao commited on
Commit
cd01e76
·
verified ·
1 Parent(s): 1da61b3

Change Workflow

Browse files

Use Faster Models and Use The Open Reverb Preset

Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -278,7 +278,7 @@ def smart_mode_process(input_file, api_key, multi_singer=False):
278
 
279
  crowd_resp = send_mvsep_audio_job(
280
  api_key, open(music_buf.name, 'rb').read(), os.path.basename(music_buf.name),
281
- sep_type=34, output_format=2, addopt1=1
282
  )
283
  os.unlink(music_buf.name)
284
  crowd, _ = download_wav(crowd_resp['files'][0]['url'], target_fs=fs)
@@ -293,7 +293,7 @@ def smart_mode_process(input_file, api_key, multi_singer=False):
293
 
294
  demucs_resp = send_mvsep_audio_job(
295
  api_key, open(demucs_input_buf.name, 'rb').read(), os.path.basename(demucs_input_buf.name),
296
- sep_type=24, output_format=2, addopt1=1
297
  )
298
  os.unlink(demucs_input_buf.name)
299
 
@@ -303,7 +303,7 @@ def smart_mode_process(input_file, api_key, multi_singer=False):
303
 
304
  # Step 4: Apply Reverb to the 'music' stem
305
  p((4, 8), "Applying Reverb")
306
- reverb_args = ['70', '40', '100', '95', '10', '0'] # music preset
307
  reverb_L = apply_reverb_wet_only(music[:, 0], fs, reverb_args)
308
  reverb_R = apply_reverb_wet_only(music[:, 1], fs, reverb_args)
309
  reverb = np.column_stack([reverb_L, reverb_R])
 
278
 
279
  crowd_resp = send_mvsep_audio_job(
280
  api_key, open(music_buf.name, 'rb').read(), os.path.basename(music_buf.name),
281
+ sep_type=34, output_format=2, addopt1=0
282
  )
283
  os.unlink(music_buf.name)
284
  crowd, _ = download_wav(crowd_resp['files'][0]['url'], target_fs=fs)
 
293
 
294
  demucs_resp = send_mvsep_audio_job(
295
  api_key, open(demucs_input_buf.name, 'rb').read(), os.path.basename(demucs_input_buf.name),
296
+ sep_type=24, output_format=2
297
  )
298
  os.unlink(demucs_input_buf.name)
299
 
 
303
 
304
  # Step 4: Apply Reverb to the 'music' stem
305
  p((4, 8), "Applying Reverb")
306
+ reverb_args = ['20', '50', '100', '100', '100', '0'] # open preset
307
  reverb_L = apply_reverb_wet_only(music[:, 0], fs, reverb_args)
308
  reverb_R = apply_reverb_wet_only(music[:, 1], fs, reverb_args)
309
  reverb = np.column_stack([reverb_L, reverb_R])