Spaces:
Sleeping
Sleeping
cptsubtext
commited on
Commit
·
cd87ff7
1
Parent(s):
1bf134e
add verbosity for audio transcribe to gain more insight
Browse files
app.py
CHANGED
@@ -27,7 +27,10 @@ def transcribe_to_subtitle(audio_bytes, model_name):
|
|
27 |
return
|
28 |
|
29 |
# Transcribe audio
|
30 |
-
|
|
|
|
|
|
|
31 |
|
32 |
# Generate subtitle file
|
33 |
subtitle_text = result.text
|
|
|
27 |
return
|
28 |
|
29 |
# Transcribe audio
|
30 |
+
try:
|
31 |
+
result = model.transcribe(audio_bytes, verbose=True)
|
32 |
+
except Exception as e:
|
33 |
+
return {"error": f"Error during transcription: {str(e)}"}
|
34 |
|
35 |
# Generate subtitle file
|
36 |
subtitle_text = result.text
|