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

Add function to clear model words #48

Closed
tazz4843 opened this issue Oct 12, 2022 · 4 comments
Closed

Add function to clear model words #48

tazz4843 opened this issue Oct 12, 2022 · 4 comments
Labels
enhancement New feature or request

Comments

@tazz4843
Copy link
Contributor

Hi there! I'm trying to save compute resources by reusing WhisperContext objects in a STT server instance, but if no words were detected in the audio, it will cause whatever words were found in the last transcription that had words detected to be spit out again. This is a major issue, and I'd like a way to prevent this. The easiest way I can think of is adding a function to clear the words stored in the model. I considered adding such a feature to my app, but I realized this could cause serious overhead and introduce user privacy risks from storing many sentences compared to just clearing the words from the model itself. Thanks!

@ggerganov ggerganov added the enhancement New feature or request label Oct 13, 2022
@ggerganov
Copy link
Owner

Before extending the interface of whisper.cpp can you confirm that setting params.no_context = true; fixes the repetition:

bool no_context;

@tazz4843
Copy link
Contributor Author

Setting params.no_context = true does not fix the repetition, or cause any noticeable change in output.

ggerganov added a commit that referenced this issue Oct 15, 2022
This way, even if the input audio is empty, the previous results will be
removed.
@ggerganov
Copy link
Owner

I think the latest change should resolve your problem - give it a try

@tazz4843
Copy link
Contributor Author

It does fix the issue, thanks!

mattsta pushed a commit to mattsta/whisper.cpp that referenced this issue Apr 1, 2023
Adding scoop install to setup for windows for ffmpeg
anandijain pushed a commit to anandijain/whisper.cpp that referenced this issue Apr 28, 2023
This way, even if the input audio is empty, the previous results will be
removed.
jacobwu-b pushed a commit to jacobwu-b/Transcriptify-by-whisper.cpp that referenced this issue Oct 24, 2023
This way, even if the input audio is empty, the previous results will be
removed.
kultivator-consulting pushed a commit to KultivatorConsulting/whisper.cpp that referenced this issue Feb 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants