Update whispercpp.pyx

This commit is contained in:
Luke Southam 2022-12-18 21:42:59 +00:00 committed by GitHub
parent 64008a7d64
commit 86fca83bcf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -100,7 +100,9 @@ cdef class Whisper:
whisper_free(self.ctx) whisper_free(self.ctx)
def transcribe(self, filename=TEST_FILE): def transcribe(self, filename=TEST_FILE):
print("Loading data..")
cdef audio_data data = load_audio(<bytes>filename) cdef audio_data data = load_audio(<bytes>filename)
print("Transcribing..")
return whisper_full(self.ctx, self.params, data.frames, data.n_frames) return whisper_full(self.ctx, self.params, data.frames, data.n_frames)
def extract_text(self, int res): def extract_text(self, int res):