Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -19,6 +19,9 @@ def process_audio(audio):
|
|
19 |
# Ensure the audio data is in the correct format
|
20 |
audio_data = np.int16(audio_data / np.max(np.abs(audio_data)) * 32767)
|
21 |
|
|
|
|
|
|
|
22 |
# Save the uploaded audio file to a temporary location
|
23 |
wavio.write("temp.wav", audio_data[:, np.newaxis], sample_rate, sampwidth=2)
|
24 |
|
|
|
19 |
# Ensure the audio data is in the correct format
|
20 |
audio_data = np.int16(audio_data / np.max(np.abs(audio_data)) * 32767)
|
21 |
|
22 |
+
# Convert audio_data to a numpy array
|
23 |
+
audio_data = np.array(audio_data)
|
24 |
+
|
25 |
# Save the uploaded audio file to a temporary location
|
26 |
wavio.write("temp.wav", audio_data[:, np.newaxis], sample_rate, sampwidth=2)
|
27 |
|