Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -11,12 +11,11 @@ whisper_pipeline = pipeline(
|
|
| 11 |
)
|
| 12 |
|
| 13 |
def transcribe_audio(audio):
|
|
|
|
| 14 |
try:
|
| 15 |
-
# Process and transcribe the audio
|
| 16 |
result = whisper_pipeline(audio)["text"]
|
| 17 |
return result
|
| 18 |
except Exception as e:
|
| 19 |
-
# Handle errors and return an error message
|
| 20 |
return f"An error occurred during transcription: {str(e)}"
|
| 21 |
|
| 22 |
# Gradio Interface with optimizations
|
|
|
|
| 11 |
)
|
| 12 |
|
| 13 |
def transcribe_audio(audio):
|
| 14 |
+
print(f"Received audio type: {type(audio)}") # Debugging line
|
| 15 |
try:
|
|
|
|
| 16 |
result = whisper_pipeline(audio)["text"]
|
| 17 |
return result
|
| 18 |
except Exception as e:
|
|
|
|
| 19 |
return f"An error occurred during transcription: {str(e)}"
|
| 20 |
|
| 21 |
# Gradio Interface with optimizations
|