Spaces:
Sleeping
Sleeping
Improve error handling in audio processing; enhance troubleshooting tips for FFmpeg errors
Browse files- src/streamlit_app.py +5 -4
src/streamlit_app.py
CHANGED
@@ -764,13 +764,14 @@ with tab2:
|
|
764 |
with col2:
|
765 |
if results['audio_viz']:
|
766 |
st.pyplot(results['audio_viz'])
|
767 |
-
|
|
|
768 |
st.error("Error processing audio file")
|
769 |
st.error(f"FFmpeg error: {e.stderr.decode('utf-8') if e.stderr else str(e)}")
|
770 |
st.info("Troubleshooting tips:\n"
|
771 |
-
|
772 |
-
|
773 |
-
|
774 |
|
775 |
except PermissionError as e:
|
776 |
st.error(f"Permission error: {str(e)}")
|
|
|
764 |
with col2:
|
765 |
if results['audio_viz']:
|
766 |
st.pyplot(results['audio_viz'])
|
767 |
+
|
768 |
+
except subprocess.CalledProcessError as e:
|
769 |
st.error("Error processing audio file")
|
770 |
st.error(f"FFmpeg error: {e.stderr.decode('utf-8') if e.stderr else str(e)}")
|
771 |
st.info("Troubleshooting tips:\n"
|
772 |
+
"• Try a different audio file format (WAV or MP3 recommended)\n"
|
773 |
+
"• Make sure the file is not corrupted\n"
|
774 |
+
"• Try a shorter audio clip")
|
775 |
|
776 |
except PermissionError as e:
|
777 |
st.error(f"Permission error: {str(e)}")
|