demavior commited on
Commit
61b6298
·
verified ·
1 Parent(s): 0f1dfb7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -15,7 +15,7 @@ def transcribe(audio):
15
  audio_data = np.array(audio_data)
16
 
17
  # Convert to mono if the audio is stereo
18
- if audio_data.ndim > 1 and audio_data.shape[0] > 1:
19
  audio_data = np.mean(audio_data, axis=0)
20
 
21
  # Reshape the audio data to match the expected input format (1, num_samples)
 
15
  audio_data = np.array(audio_data)
16
 
17
  # Convert to mono if the audio is stereo
18
+ if audio_data.ndim > 1:
19
  audio_data = np.mean(audio_data, axis=0)
20
 
21
  # Reshape the audio data to match the expected input format (1, num_samples)