Enhanced Error Handling and Retries in Downloading Segments: - Improved the download_segment function in stream_transcription_module.py to include more robust error handling and retries for downloading segments. - Added a max_retries parameter to the download_segment function to specify the number of retry attempts. - The function now handles requests.exceptions.RequestException specifically for network-related errors, providing more informative error messages. - Implemented a retry mechanism with an optional retry_delay to handle temporary network issues. - Added error handling for http.client.IncompleteRead exceptions, which can occur if the connection drops during download.
Improved M3U8 Playlist Loading: - The load_m3u8_with_retry function in stream_transcription_module.py has been enhanced to retry loading the M3U8 playlist file if there are errors, making it more resilient to network fluctuations. - The function now handles potential requests.exceptions.RequestException and http.client.IncompleteRead errors during playlist loading, retrying with a delay until successful.
Optimized Segment Downloading and Skipping Logic: - Streamlined the segment downloading logic to avoid re-downloading already processed segments, improving efficiency. - Modified the code to skip segments that have already been downloaded successfully, preventing unnecessary downloads.
Prep for native audio capture support - Added sounddevice, soundfile, and pydub to requirements.txt for audio capture. Will be using a more native way to capture audio better.
GUI Improvements - Adjusted vertical spacing for headers in player.html to address potential overlapping issues. This change ensures better visual clarity and prevents elements from overlapping, enhancing the user interface.
Bug Fixes:
Fixed Issue with Segment Downloading in stream_transcription_module.py: - Resolved a bug where the code was not properly skipping already downloaded segments in certain situations. This fix ensures that only new segments are downloaded instead of trying to decode broken audio files, improving efficiency. Fixes #108
Fixed Issue with Incorrect HLS Flags in remote_microphone.py: - Corrected the HLS flags used in the FFmpeg command in remote_microphone.py. This change ensures that the generated HLS playlist is created correctly, addressing potential issues with live stream playback.
Improvements:
download_segment
function instream_transcription_module.py
to include more robust error handling and retries for downloading segments. - Added amax_retries
parameter to thedownload_segment
function to specify the number of retry attempts. - The function now handlesrequests.exceptions.RequestException
specifically for network-related errors, providing more informative error messages. - Implemented a retry mechanism with an optionalretry_delay
to handle temporary network issues. - Added error handling forhttp.client.IncompleteRead
exceptions, which can occur if the connection drops during download.load_m3u8_with_retry
function instream_transcription_module.py
has been enhanced to retry loading the M3U8 playlist file if there are errors, making it more resilient to network fluctuations. - The function now handles potentialrequests.exceptions.RequestException
andhttp.client.IncompleteRead
errors during playlist loading, retrying with a delay until successful.sounddevice
,soundfile
, andpydub
to requirements.txt for audio capture. Will be using a more native way to capture audio better.player.html
to address potential overlapping issues. This change ensures better visual clarity and prevents elements from overlapping, enhancing the user interface.Bug Fixes:
stream_transcription_module.py
: - Resolved a bug where the code was not properly skipping already downloaded segments in certain situations. This fix ensures that only new segments are downloaded instead of trying to decode broken audio files, improving efficiency. Fixes #108remote_microphone.py
: - Corrected the HLS flags used in the FFmpeg command inremote_microphone.py
. This change ensures that the generated HLS playlist is created correctly, addressing potential issues with live stream playback.