Spaces:
Sleeping
Sleeping
Update pages/Lifecycle of Machine Learning.py
Browse files
pages/Lifecycle of Machine Learning.py
CHANGED
@@ -252,7 +252,7 @@ cap = cv2.VideoCapture(video_path)
|
|
252 |
|
253 |
|
254 |
|
255 |
-
st.write("*Common Issues When Handling
|
256 |
|
257 |
st.write(
|
258 |
"""
|
@@ -274,5 +274,63 @@ cap = cv2.VideoCapture(video_path)
|
|
274 |
- Control Frame Rate and Prevent Skipping
|
275 |
"""
|
276 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
277 |
|
278 |
|
|
|
252 |
|
253 |
|
254 |
|
255 |
+
st.write("*Common Issues When Handling video Files*")
|
256 |
|
257 |
st.write(
|
258 |
"""
|
|
|
274 |
- Control Frame Rate and Prevent Skipping
|
275 |
"""
|
276 |
)
|
277 |
+
elif format_selected == "AUDIO":
|
278 |
+
|
279 |
+
st.subheader("AUDIO Data Format")
|
280 |
+
st.write("*What is it?*")
|
281 |
+
st.write(
|
282 |
+
"MP3,WAV,FLAC,AAC,OGG "
|
283 |
+
)
|
284 |
+
|
285 |
+
|
286 |
+
st.write("*How to Read AUDIO Files?*")
|
287 |
+
st.code(
|
288 |
+
|
289 |
+
"""
|
290 |
+
|
291 |
+
|
292 |
+
pip install librosa
|
293 |
+
import librosa
|
294 |
+
|
295 |
+
# Load the audio file
|
296 |
+
audio_path = 'path_to_audio_file.wav'
|
297 |
+
y, sr = librosa.load(audio_path, sr=None) # sr=None to preserve the original sampling rate
|
298 |
+
""",
|
299 |
+
language="python"
|
300 |
+
|
301 |
+
|
302 |
+
)
|
303 |
+
|
304 |
+
|
305 |
+
|
306 |
+
|
307 |
+
|
308 |
+
|
309 |
+
|
310 |
+
|
311 |
+
|
312 |
+
st.write("*Common Issues When Handling audio Files*")
|
313 |
+
|
314 |
+
st.write(
|
315 |
+
"""
|
316 |
+
- File not found or Corrupted.
|
317 |
+
- Incompatible Codec or Format.
|
318 |
+
- Memory Overload or Performance Issues with Large Audios.
|
319 |
+
- Encoding or File Corruption Issues
|
320 |
+
"""
|
321 |
+
)
|
322 |
+
|
323 |
+
|
324 |
+
|
325 |
+
st.write("*How to Overcome These Errors/Issues?*")
|
326 |
+
st.write(
|
327 |
+
"""
|
328 |
+
- File Not Found or Corrupted: Always check if the file exists before attempting to load it. Handle errors gracefully with try-except.
|
329 |
+
- Incompatible Format or Codec: Use pydub or ffmpeg to handle multiple formats, or convert the file to a more compatible format.
|
330 |
+
- Memory Overload or Performance Issues: Process the audio in chunks or downsample large files to reduce memory consumption.
|
331 |
+
- Encoding or File Corruption Issues: Ensure proper encoding and re-encode files using tools like ffmpeg if necessary.
|
332 |
+
"""
|
333 |
+
)
|
334 |
+
|
335 |
|
336 |
|