Skip to content

Add progress callback to transcribe function and corresponding test #2625

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

SpyGuy0215
Copy link

Needed this functionality for a project and decided to implement it in here instead of reading stdout. This commit adds a new parameter progress_callback that updates every loop (similar to the progress bar) and passes in the percent completed to the callback.

To test this, I also added a longer file fdr.mp3 (trying to fit the theme) and a test that runs whisper with a progress callback that dumps all the values to an array. It does 2 simple checks: if the array is longer than 0 and if the last value is 100.0.

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.

1 participant