RexChan commited on
Commit
66c9f7b
1 Parent(s): 2fe7c07

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -24,7 +24,9 @@ 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
 
24
 
25
  global vocals_data
26
  # Convert input data to numpy array
27
+ with open(input_file, 'rb') as f:
28
+ audio_bytes = f.read()
29
+ audio_array = np.frombuffer(audio_bytes, dtype=np.int16)
30
 
31
  # Perform vocal removal on the audio input
32
  # Pass the audio array as waveform to separate() method