Update utils/audio_processing.py
Browse files
utils/audio_processing.py
CHANGED
@@ -70,17 +70,10 @@ def download_audio_as_wav(url, max_filesize_mb=70):
|
|
70 |
# Cleanup wav if created
|
71 |
if temp_wav is not None and os.path.exists(temp_wav.name):
|
72 |
os.remove(temp_wav.name)
|
|
|
73 |
return None
|
74 |
|
75 |
-
|
76 |
-
if "st" in globals():
|
77 |
-
st.error("Unexpected error occurred.")
|
78 |
-
st.code(str(e))
|
79 |
-
else:
|
80 |
-
print("Unexpected error:", e)
|
81 |
-
if temp_wav is not None and os.path.exists(temp_wav.name):
|
82 |
-
os.remove(temp_wav.name)
|
83 |
-
return None
|
84 |
|
85 |
# --------------------------
|
86 |
# Utility: Trim audios to 2 minutes
|
|
|
70 |
# Cleanup wav if created
|
71 |
if temp_wav is not None and os.path.exists(temp_wav.name):
|
72 |
os.remove(temp_wav.name)
|
73 |
+
st.stop()
|
74 |
return None
|
75 |
|
76 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
|
78 |
# --------------------------
|
79 |
# Utility: Trim audios to 2 minutes
|