Delik commited on
Commit
fd6daba
·
verified ·
1 Parent(s): 4fa14c8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
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