Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flush transcription buffer on mute #557

Closed

Conversation

rpurdel
Copy link
Contributor

@rpurdel rpurdel commented Oct 2, 2024

No description provided.

@rpurdel rpurdel requested a review from damencho October 2, 2024 06:59
@damencho
Copy link
Member

damencho commented Oct 2, 2024

This PR includes the previous one? Let's work and merge the other one first, so you can rebase and then review this one. To minimize the number of changes in this one and not repeat my comments from the other one.


private void startBufferCheck()
{
new Thread(() -> {
Copy link
Member

Choose a reason for hiding this comment

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

This thread is not a daemon thread and will be preventing JVM from exiting. The code formatting is not correct.
And in general, adding a thread for every participant even if the participant will not be transcribed will increase the threads drastically and is a waste of resources.
Let's discuss this and maybe we can find a better approach.

Copy link
Member

Choose a reason for hiding this comment

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

Maybe we can add one global thread that goes over transcriber sessions and go over participants every second, using the scheduled executors and flush when needed.
It is not time consuming task and there will very few to flush.

Copy link
Member

Choose a reason for hiding this comment

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

I wonder though, that the buffer is not full which means that is less than 500ms of speech ... how many words is this ... I don't think that is more than one word. But yeah it may be the end of one and another one, so it will prevent a total of two words from being transcribed.

@rpurdel rpurdel force-pushed the flush-transcription-buffer-on-mute branch from 3ad71d8 to ae318aa Compare October 3, 2024 08:09
@rpurdel rpurdel requested a review from damencho October 3, 2024 08:10
@rpurdel rpurdel force-pushed the flush-transcription-buffer-on-mute branch from f94d89a to bb6dd3c Compare October 8, 2024 06:53
@rpurdel rpurdel closed this Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants