RexChan commited on
Commit
2fe7c07
·
verified ·
1 Parent(s): 98c5621

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -24,11 +24,11 @@ def audio_preprocess(input_file): #, in_data, frame_count, time_info, status):
24
 
25
  global vocals_data
26
  # Convert input data to numpy array
27
- #audio_array = np.frombuffer(input_file, dtype=np.int16)
28
 
29
  # Perform vocal removal on the audio input
30
  # Pass the audio array as waveform to separate() method
31
- vocals = Separator('spleeter:2stems').separate(input_file)
32
 
33
  # Convert vocals to audio data
34
  vocals_data = vocals['vocals'].flatten().astype(np.int16).tobytes()
 
24
 
25
  global vocals_data
26
  # Convert input data to numpy array
27
+ audio_array = np.frombuffer(input_file, dtype=np.int16)
28
 
29
  # Perform vocal removal on the audio input
30
  # Pass the audio array as waveform to separate() method
31
+ vocals = Separator('spleeter:2stems').separate(audio_array)
32
 
33
  # Convert vocals to audio data
34
  vocals_data = vocals['vocals'].flatten().astype(np.int16).tobytes()