Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -32,9 +32,8 @@ def transcribe(audio):
|
|
32 |
if audio_np.ndim == 2:
|
33 |
audio_np = audio_np
|
34 |
|
35 |
-
#
|
36 |
-
|
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",
|