demavior commited on
Commit
e9a8cc2
·
verified ·
1 Parent(s): 5018787

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -32,9 +32,8 @@ def transcribe(audio):
32
  if audio_np.ndim == 2:
33
  audio_np = audio_np
34
 
35
- # Debugging: Print the shape and type of the audio data
36
- print(f"Audio data shape: {audio_np.shape}")
37
- print(f"Audio data type: {audio_np.dtype}")
38
 
39
  pipe = pipeline(
40
  "automatic-speech-recognition",
 
32
  if audio_np.ndim == 2:
33
  audio_np = audio_np
34
 
35
+ # Ensure the audio data is in the correct format for the pipeline
36
+ audio_np = np.expand_dims(audio_np, axis=0)
 
37
 
38
  pipe = pipeline(
39
  "automatic-speech-recognition",