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

Cache model loads (should make subsequent /transcribe calls an order … #21

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

Conversation

kkaehler
Copy link

@kkaehler kkaehler commented Jun 5, 2023

…of magnitude faster).

Note - I didn't test this (change was made via web UI).

…of magnitude faster).

Note - I didn't test this (change was made via web UI).
@@ -18,7 +20,10 @@ def transcribe():
# there are no english models for large
if model != 'large' and language == 'english':
model = model + '.en'
audio_model = whisper.load_model(model)

if model in _model_cache:
Copy link
Owner

Choose a reason for hiding this comment

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

Did you mean:
if model not in _model_cache:

Copy link
Owner

Choose a reason for hiding this comment

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

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