Merge pull request #5 from kingjan1999/patch-1

Fix wrong model key in __init__
This commit is contained in:
Luke Southam 2023-01-27 15:38:35 +00:00 committed by GitHub
commit 8699de6106
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -90,7 +90,7 @@ cdef class Whisper:
cdef whisper_full_params params
def __init__(self, model=DEFAULT_MODEL, pb=None):
model_fullname = f'model_ggml_{model}.bin'.encode('utf8')
model_fullname = f'ggml-{model}.bin'.encode('utf8')
download_model(model_fullname)
cdef bytes model_b = MODELS_DIR.encode('utf8') + b'/' + model_fullname
self.ctx = whisper_init(model_b)