Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
|
|
|
|
|
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
|