whisper.cpp v1.2.1

This commit is contained in:
lightmare 2023-03-02 18:10:36 +00:00
parent d5eb133526
commit d14f1b6c25
4 changed files with 4 additions and 4 deletions

2
.gitmodules vendored
View File

@ -1,4 +1,4 @@
[submodule "whisper.cpp"]
path = whisper.cpp
url = https://github.com/ggerganov/whisper.cpp
branch = b2083c5d02db9a1e6dbb3d58254fd65ebfff4b5d
branch = ad1389003d3f8bd47b8ca7d4c21b4764cc3844fc

@ -1 +1 @@
Subproject commit 1d716d6e34f3f4ba57bd9706a9258a0bdb008153
Subproject commit ad1389003d3f8bd47b8ca7d4c21b4764cc3844fc

View File

@ -71,7 +71,7 @@ cdef extern from "whisper.h" nogil:
whisper_encoder_begin_callback encoder_begin_callback
void* encoder_begin_callback_user_data
whisper_full_params whisper_full_default_params(whisper_sampling_strategy)
cdef whisper_context* whisper_init(char*)
cdef whisper_context* whisper_init_from_file(char*)
cdef void whisper_free(whisper_context*)
cdef int whisper_pcm_to_mel(whisper_context*, float*, int, int)
cdef int whisper_set_mel(whisper_context*, float*, int, int)

View File

@ -141,7 +141,7 @@ cdef class Whisper:
download_model(model_fullname, models_dir=models_dir)
model_path = Path(models_dir).joinpath(model_fullname)
cdef bytes model_b = str(model_path).encode('utf8')
self.ctx = whisper_init(model_b)
self.ctx = whisper_init_from_file(model_b)
self.params = set_params(print_realtime, print_progress, token_timestamps, print_timestamps, translate, language, n_threads)
if print_system_info:
print(whisper_print_system_info().decode())