Skip to content

Conversation

@Amitabitbul
Copy link

This pull request includes several changes to the whisper_live/client.py file, focusing on improving the WebSocket connection handling, segment processing, and transcript writing. The most important changes are summarized below:

WebSocket Connection Handling:

Segment Processing:

  • Simplified the logic for handling the last segment in the process_segments method by removing the check for the completed flag. (whisper_live/client.py, whisper_live/client.pyL115-R121)

Transcript Writing:

  • Modified the write_srt_file method to always append the last_segment to the transcript if it exists, regardless of its content. (whisper_live/client.py, whisper_live/client.pyL262-R264)

Code Cleanup:

  • Removed unused parameters max_clients and max_connection_time from the on_open method and the __init__ method of the Client class. (whisper_live/client.py, [1] [2]

@makaveli10
Copy link
Collaborator

Simplified the logic for handling the last segment in the process_segments method by removing the check for the completed flag. (whisper_live/client.py, whisper_live/client.pyL115-R121)

@Amitabitbul Not sure why we would remove the completed flag, it helps in only adding the completed segments to the srt file.

@makaveli10
Copy link
Collaborator

Removed unused parameters max_clients and max_connection_time from the on_open method and the init method of the Client class. (whisper_live/client.py, [1] [2]

This helps in changing the server params to change the number of clients and the amount of time a client is allowed to stay connected to the server.

@Amitabitbul
Copy link
Author

Simplified the logic for handling the last segment in the process_segments method by removing the check for the completed flag. (whisper_live/client.py, whisper_live/client.pyL115-R121)

@Amitabitbul Not sure why we would remove the completed flag, it helps in only adding the completed segments to the srt file.

I will remove it, I needed it only in my project

Copy link
Author

@Amitabitbul Amitabitbul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WSS changes only

@makaveli10
Copy link
Collaborator

@Amitabitbul Can you check again that we dont remove the completion flag? Because I can still see that change.

@Amitabitbul
Copy link
Author

@makaveli10 Done :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants