RexChan commited on
Commit
c6cd1c9
·
verified ·
1 Parent(s): 2d050bc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -24,15 +24,15 @@ 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(audio_array)
32
 
33
  # Convert vocals to audio data
34
  vocals_data = vocals['vocals'].flatten().astype(np.int16).tobytes()
35
- separated_audio = vocals_data
36
 
37
  # Return processed data for output
38
  return vocals_data, pyaudio.paContinue, processed_audio
 
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()
35
+ processed_audio = vocals_data
36
 
37
  # Return processed data for output
38
  return vocals_data, pyaudio.paContinue, processed_audio